ActionAttribute Class

Definition

Flags a method to respond to an Objective-C action

[System.AttributeUsage(System.AttributeTargets.Method)]
public sealed class ActionAttribute : Foundation.ExportAttribute
type ActionAttribute = class
    inherit ExportAttribute
Inheritance
ActionAttribute
Attributes

Remarks

You can apply this attribute to a method, turning it into an action that can be invoked by the Objective-C world.


    [Action ("clicked:")]
    void Submit (NSObject sender)
    {
	    // User has clicked on the Submit button, respond to this action
    }

Constructors

ActionAttribute()

Initializes a new instance of an Action attribute

ActionAttribute(String)

Creates a new instance of the action attribtue with the given selector.

Properties

ArgumentSemantic

The semantics for object ownership on setter properties or methods.

(Inherited from ExportAttribute)
IsVariadic (Inherited from ExportAttribute)
Selector

The name of the C# selector if specified, or null if it is derived from the property name or method.

(Inherited from ExportAttribute)

Methods

ToGetter(PropertyInfo) (Inherited from ExportAttribute)
ToSetter(PropertyInfo) (Inherited from ExportAttribute)

Applies to