共用方式為


UITableViewDataSource.MoveRow(UITableView, NSIndexPath, NSIndexPath) 方法

定義

移動資料列時呼叫,讓資料來源可以「實作」已在使用者介面中執行之已變更的資料列位置。 這可確保資料與顯示的內容保持同步。

[Foundation.Export("tableView:moveRowAtIndexPath:toIndexPath:")]
public virtual void MoveRow (UIKit.UITableView tableView, Foundation.NSIndexPath sourceIndexPath, Foundation.NSIndexPath destinationIndexPath);
abstract member MoveRow : UIKit.UITableView * Foundation.NSIndexPath * Foundation.NSIndexPath -> unit
override this.MoveRow : UIKit.UITableView * Foundation.NSIndexPath * Foundation.NSIndexPath -> unit

參數

tableView
UITableView

包含要移動之資料列的資料表檢視。

sourceIndexPath
NSIndexPath

要移動之資料列的位置。

destinationIndexPath
NSIndexPath

資料列的新位置。

屬性

備註

當資料表檢視處於編輯模式) 時 (移動資料列時,必須更新來源以反映該變更。 實作這個方法,以保存資料來源中更新的資料列位置。

適用於