UITableViewSource.CommitEditingStyle Method

Definition

Commits the insertion or deletion of the specified row.

[Foundation.Export("tableView:commitEditingStyle:forRowAtIndexPath:")]
public virtual void CommitEditingStyle (UIKit.UITableView tableView, UIKit.UITableViewCellEditingStyle editingStyle, Foundation.NSIndexPath indexPath);
abstract member CommitEditingStyle : UIKit.UITableView * UIKit.UITableViewCellEditingStyle * Foundation.NSIndexPath -> unit
override this.CommitEditingStyle : UIKit.UITableView * UIKit.UITableViewCellEditingStyle * Foundation.NSIndexPath -> unit

Parameters

tableView
UITableView

Table view requesting insertion or deletion.

editingStyle
UITableViewCellEditingStyle

Cell editing style requested for the row at indexPath, such as Insert or Delete.

indexPath
NSIndexPath

Location of the row.

Attributes

Remarks

When the user taps the insertion (green plus) or Delete button in a cell, the table view calls this method to commit the change (if the user taps the deletion (red minus) button, that simply reveals the Delete button).

This method should commit the editingStyle by calling UITableView methods InsertRows(NSIndexPath[], UITableViewRowAnimation) or DeleteRows(NSIndexPath[], UITableViewRowAnimation).

This method must be implemented to enable the swipe-to-delete feature of the table view control.

You should not call SetEditing(Boolean, Boolean) in this method. If for some reason you need to, invoke it after a delay using PerformSelector(Selector, NSObject, Double, NSString[]).

Declared in [UITableViewDataSource]

Applies to