delegate
The collection view’s delegate object.
Declaration
weak var delegate: (any NSCollectionViewDelegate)? { get set }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.