UIKit.UITableViewSource.CommitEditingStyle Method
Commits the insertion or deletion of the specified row.

Syntax

[Foundation.Export("tableView:commitEditingStyle:forRowAtIndexPath:")]
public virtual void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, Foundation.NSIndexPath indexPath)

Parameters

tableView
Table view requesting insertion or deletion.
editingStyle
Cell editing style requested for the row at indexPath, such as UITableViewEditingStyle.Insert or UITableViewEditingStyle.Delete.
indexPath
Location of the row.

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 UIKit.UITableView methods UITableView.InsertRows(Foundation.NSIndexPath[], UITableViewRowAnimation) or UITableView.DeleteRows(Foundation.NSIndexPath[], UITableViewRowAnimation).

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

You should not call UITableView.SetEditing(bool, bool) in this method. If for some reason you need to, invoke it after a delay using Foundation.PerformSelector(ObjCRuntime.Selector, Foundation.NSObject, double).

Declared in [UITableViewDataSource]

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0