Instance Method


Scrolls the table view so that the selected row nearest to a specified position in the table view is at that position.


func scrollToNearestSelectedRow(at scrollPosition: UITableView.ScrollPosition, animated: Bool)



A constant that identifies a relative position in the table view (top, middle, bottom) for the row when scrolling concludes. See UITableView.ScrollPosition for a descriptions of valid constants.


true if you want to animate the change in position; false if it should be immediate.

See Also

Scrolling the Table View

func scrollToRow(at: IndexPath, at: UITableView.ScrollPosition, animated: Bool)

Scrolls through the table view until a row identified by index path is at a particular location on the screen.

enum UITableView.ScrollPosition

The position in the table view (top, middle, bottom) to which a given row is scrolled.