Editar

Compartir a través de


UIResponder.GetTargetForAction(Selector, NSObject) Method

Definition

Returns the object that responds to an action.

[Foundation.Export("targetForAction:withSender:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual Foundation.NSObject GetTargetForAction (ObjCRuntime.Selector action, Foundation.NSObject sender);
abstract member GetTargetForAction : ObjCRuntime.Selector * Foundation.NSObject -> Foundation.NSObject
override this.GetTargetForAction : ObjCRuntime.Selector * Foundation.NSObject -> Foundation.NSObject

Parameters

action
Selector

The selector that represents the action that is being probed. For editing operations, these selectors are "copy:", "cut:", "delete:", "paste:", "select:", "selectAll:", "toggleBoldface:", "toggleItalics:", "toggleUnderline:".

sender
NSObject

Object calling this method.

This parameter can be null.

Returns

The object that can handle the action.

Attributes

Remarks

The default implementation of this method calls the CanPerform(Selector, NSObject) method, and if it returns true, it returns this instance.

This method can be overwritten to provide a different behavior than the default.

Applies to