Instance Property


The object that acts as the delegate of the collection view.


weak var delegate: UICollectionViewDelegate? { get set }


The delegate must adopt the UICollectionViewDelegate protocol. The collection view maintains a weak reference to the delegate object.

The delegate object is responsible for managing selection behavior and interactions with individual items.

See Also

Managing Collection View Interactions

protocol UICollectionViewDelegate

The UICollectionViewDelegate protocol defines methods that allow you to manage the selection and highlighting of items in a collection view and to perform actions on those items. The methods of this protocol are all optional.