Instance Method

deselectRowAtIndexPath:animated:

Deselects a given row identified by index path, with an option to animate the deselection.

Declaration

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

Parameters

indexPath

An index path identifying a row in the table view.

animated

YES if you want to animate the deselection, and NO if the change should be immediate.

Discussion

Calling this method does not cause the delegate to receive a tableView:willDeselectRowAtIndexPath: or tableView:didDeselectRowAtIndexPath: message, nor does it send UITableViewSelectionDidChangeNotification notifications to observers.

Calling this method does not cause any scrolling to the deselected row.

See Also

Selecting Rows

indexPathForSelectedRow

An index path identifying the row and section of the selected row.

indexPathsForSelectedRows

The index paths representing the selected rows.

- selectRowAtIndexPath:animated:scrollPosition:

Selects a row in the table view identified by index path, optionally scrolling the row to a location in the table view.

allowsSelection

A Boolean value that determines whether users can select a row.

allowsMultipleSelection

A Boolean value that determines whether users can select more than one row outside of editing mode.

allowsSelectionDuringEditing

A Boolean value that determines whether users can select cells while the table view is in editing mode.

allowsMultipleSelectionDuringEditing

A Boolean value that controls whether users can select more than one cell simultaneously in editing mode.

UITableViewSelectionDidChangeNotification

Posted when the selected row in the posting table view changes.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software