---
title: delegate
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscollectionview/delegate
---

# delegate

The collection view’s delegate object.

## Declaration

```swift
weak var delegate: (any NSCollectionViewDelegate)? { get set }
```

## Discussion

Discussion Use the delegate object to manage the selection and highlighting of items, track the addition and removal of items, and manage drag and drop operations. The object you assign to this property must conform to the NSCollectionViewDelegate protocol. The default value of this property is nil.

## See Also

### Configuring the Collection View

- [NSCollectionViewDelegate](appkit/nscollectionviewdelegate.md)
- [content](appkit/nscollectionview/content.md)
- [backgroundView](appkit/nscollectionview/backgroundview.md)
- [backgroundColors](appkit/nscollectionview/backgroundcolors.md)
- [backgroundViewScrollsWithContent](appkit/nscollectionview/backgroundviewscrollswithcontent.md)
