Instance Property

allowsSelection

A Boolean value that indicates whether users can select items in the collection view.

Declaration

@property(nonatomic) BOOL allowsSelection;

Discussion

If the value of this property is YES (the default), users can select items. If you want more fine-grained control over the selection of items, you must provide a delegate object and implement the appropriate methods of the UICollectionViewDelegate protocol.

See Also

Managing the Selection

allowsMultipleSelection

A Boolean value that determines whether users can select more than one item in the collection view.

indexPathsForSelectedItems

The index paths for the selected items.

- selectItemAtIndexPath:animated:scrollPosition:

Selects the item at the specified index path and optionally scrolls it into view.

- deselectItemAtIndexPath:animated:

Deselects the item at the specified index.