Contents

UICollectionViewDelegate

The methods adopted by the object you use to manage user interactions with items in a collection view.

Declaration

@MainActor protocol UICollectionViewDelegate : UIScrollViewDelegate

Overview

A collection view delegate manages user interactions with the collection view’s contents, including item selection, highlighting, and performing actions on those items. The methods of this protocol are all optional.

When configuring the collection view object, assign your delegate object to its delegate property. For more information, see UICollectionView.

Topics

Managing the selected cells

Managing cell highlighting

Tracking the addition and removal of views

Handling layout changes

Managing context menus

Working with focus

Editing items

Managing actions for cells

Handling scene transitions

Controlling the spring-loading behavior

Deprecated

See Also

Managing collection view interactions