iOS Guides | Samples

UIKit.UIAlertAction Class

Defines the style, title, and behavior of an alert presented to the user with a UIAlertController. Use the UIAlertAction.Create static method to instantiate.

See Also: UIAlertAction

Syntax

[Foundation.Register("UIAlertAction", true)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.None, null)]
public class UIAlertAction : NSObject, INSCopying, IDisposable

Related content

Requirements

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

The members of UIKit.UIAlertAction are listed below.

See Also: NSObject

Public Constructors

Default constructor, initializes a new instance of this class.

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

[read-only]
override
ClassHandleIntPtr. The handle for this class.
EnabledBoolean. Gets a value that tells whether the user can expect the action to run when its button is tapped.
[read-only]
StyleUIAlertActionStyle. The style that was used to create the UIAlertAction, determines how the action is rendered in the user interface.
[read-only]
TitleString. Title that was provided when the UIAlertAction was created.

Public Methods

Copy(NSZone) : NSObject
Performs a copy of the underlying Objective-C object.
static
Create(String, UIAlertActionStyle, Action<UIAlertAction>) : UIAlertAction
Creates an action with the specified title, style and event handler.