Instance Method

scrollToNearestSelectedRow(at:animated:)

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

Declaration

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

Parameters

scrollPosition

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.

animated

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.