Instance Method

deselectItemsAtIndexPaths:

Removes the specified items from the current selection.

Declaration

- (void)deselectItemsAtIndexPaths:(NSSet<NSIndexPath *> *)indexPaths;

Parameters

indexPaths

The index paths of the items you want to deselect.

Discussion

Use this method to reduce the current selection. If you want to animate the deselection of the new items, call this method on the collection view’s animator proxy object instead. This method does not call any methods of the delegate object when making the selection.

See Also

Managing the Selection

selectable

A Boolean value that indicates whether the user may select items in the collection view.

allowsMultipleSelection

A Boolean value that indicates whether the user may select more than one item in the collection view.

allowsEmptySelection

A Boolean value indicating whether the collection view may have no selected items.

selectionIndexPaths

The set of index paths representing the currently selected items.

- selectAll:

Selects all items in the collection view, if doing so is possible.

- deselectAll:

Deselects all items in the collection view.

- selectItemsAtIndexPaths:scrollPosition:

Adds the specified items to the current selection and optionally scrolls the items into position.