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


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

Related content


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

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

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.
StyleUIAlertActionStyle. The style that was used to create the UIAlertAction, determines how the action is rendered in the user interface.
TitleString. Title that was provided when the UIAlertAction was created.

Public Methods

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