UITableView.ScrollToRow 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
自動捲動資料表檢視,直到指定的資料列出現在必要位置為止。
[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
參數
- indexPath
- NSIndexPath
識別應該顯示 atScrollPosition
哪些資料列。 您可以傳遞 NotFound 至具有零個數據列的區段。
- atScrollPosition
- UITableViewScrollPosition
當捲動完成時,目標資料列應該會出現 (位置,例如頂端、中間、底部) 。
- animated
- Boolean
true
表示以動畫顯示捲動, false
如果資料表檢視應該直接跳到新位置。
- 屬性
備註
呼叫這個方法不會觸發 Scrolled(UIScrollView) ,這通常會在以程式設計方式叫用的 UI 作業之後發生。