Instance Method

deselectItemAtIndexPath:animated:

Deselects the item at the specified index.

Declaration

- (void)deselectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated;

Parameters

indexPath

The index path of the item to select. Specifying nil results in no change to the current selection.

animated

Specify YES to animate the change in the selection or NO to make the change without animating it.

Discussion

If the allowsSelection property is NO, calling this method has no effect.

This method does not cause any selection-related delegate methods to be called.

See Also

Managing the Selection

allowsSelection

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

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.