Edit

Share via


UITableViewSource.CanPerformAction Method

Definition

Whether the editing menu should omit the Copy or Paste command for the specified row.

[Foundation.Export("tableView:canPerformAction:forRowAtIndexPath:withSender:")]
public virtual bool CanPerformAction (UIKit.UITableView tableView, ObjCRuntime.Selector action, Foundation.NSIndexPath indexPath, Foundation.NSObject sender);
abstract member CanPerformAction : UIKit.UITableView * ObjCRuntime.Selector * Foundation.NSIndexPath * Foundation.NSObject -> bool
override this.CanPerformAction : UIKit.UITableView * ObjCRuntime.Selector * Foundation.NSIndexPath * Foundation.NSObject -> bool

Parameters

tableView
UITableView

Table view containing the row.

action
Selector

A selector identifying the Copy or Paste method (ie. Copy(NSObject) or Paste(NSObject)).

indexPath
NSIndexPath

Location of the row.

sender
NSObject

Object that initially triggere the Copy or Paste.

This parameter can be null.

Returns

true if the command corresponding to action, otherwise false. The default is false.

Attributes

Remarks

Invoked after ShouldShowMenu(UITableView, NSIndexPath) to potentially exclude one of the commands (Copy or Paste) from the editing menu. For example, if the user triggers the editing menu on a row that does not accept pasted content, return false from this method.

Declared in [UITableViewDelegate]

Applies to