Contents

deselectRow(at:animated:)

Deselects a row that an index path identifies, with an option to animate the deselection.

Declaration

func deselectRow(at indexPath: IndexPath, animated: Bool)

Parameters

  • indexPath:

    An index path identifying a row in the table view.

  • animated:

    True if you want to animate the deselection, and False if the change should be immediate.

Mentioned in

Discussion

Calling this method doesn’t cause the delegate to receive a tableView(_:willDeselectRowAt:) or tableView(_:didDeselectRowAt:) message, nor does it send selectionDidChangeNotification notifications to observers.

Calling this method doesn’t cause any scrolling to the deselected row.

See Also

Selecting rows