UITableView.InsertSections(NSIndexSet, UITableViewRowAnimation) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從資料表檢視插入區段 (或區段) ,並有選項可讓作業產生動畫效果。
[Foundation.Export("insertSections:withRowAnimation:")]
public virtual void InsertSections (Foundation.NSIndexSet sections, UIKit.UITableViewRowAnimation withRowAnimation);
abstract member InsertSections : Foundation.NSIndexSet * UIKit.UITableViewRowAnimation -> unit
override this.InsertSections : Foundation.NSIndexSet * UIKit.UITableViewRowAnimation -> unit
參數
- sections
- NSIndexSet
要插入的一組區段識別碼。 如果某個區段已存在於指定的索引處,則會向上移動一個索引位置。
- withRowAnimation
- UITableViewRowAnimation
插入資料列時要使用的動畫類型 (例如從左) 淡入或投影片
- 屬性
備註
UITableView
接著會立即呼叫相關 UITableViewSource 方法,以取得儲存格和其他內容以顯示可見的資料列。
在 和 所 BeginUpdates()EndUpdates() 定義的動畫區塊內呼叫這個方法時,任何資料列或區段的插入會延後,直到處理刪除之後為止。 不論動畫區塊內的插入和刪除方法呼叫順序為何,都會發生這種情況。