Edit

Share via


UITableView.ScrollToRow Method

Definition

Automatically scrolls the table view until the specified row appears in the required position.

[Foundation.Export("scrollToRowAtIndexPath:atScrollPosition:animated:")]
public virtual void ScrollToRow (Foundation.NSIndexPath indexPath, UIKit.UITableViewScrollPosition atScrollPosition, bool animated);
abstract member ScrollToRow : Foundation.NSIndexPath * UIKit.UITableViewScrollPosition * bool -> unit
override this.ScrollToRow : Foundation.NSIndexPath * UIKit.UITableViewScrollPosition * bool -> unit

Parameters

indexPath
NSIndexPath

Identifies which row should appear atScrollPosition.   You can pass NotFound to scroll to a section with zero rows.

atScrollPosition
UITableViewScrollPosition

Position that the target row should appear (e. top, middle, bottom) once the scrolling is complete.

animated
Boolean

true to animate the scroll, false if the table view should just jump immediately to the new position.

Attributes

Remarks

Calling this method does not trigger Scrolled(UIScrollView), which would normally occur after a programmatically-invoked UI operation.

Applies to