Instance Method

scrollToRowAtIndexPath:atScrollPosition:animated:

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

Declaration

- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated;

Parameters

indexPath

An index path that identifies a row in the table view by its row index and its section index.

NSNotFound is a valid row index for scrolling to a section with zero rows.

scrollPosition

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

animated

YES if you want to animate the change in position; NO if it should be immediate.

Discussion

Invoking this method does not cause the delegate to receive a scrollViewDidScroll: message, as is normal for programmatically invoked user interface operations.

See Also

Scrolling the Table View

- scrollToNearestSelectedRowAtScrollPosition:animated:

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

UITableViewScrollPosition

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