Edytuj

Udostępnij za pośrednictwem


UIAlertController.Create(String, String, UIAlertControllerStyle) Method

Definition

Creates a UIAlertController object to display an alert to the user that includes a title, a message, and UIAlertControllerStyle preferred style, and then returns that UIAlertController object.

[Foundation.Export("alertControllerWithTitle:message:preferredStyle:")]
public static UIKit.UIAlertController Create (string title, string message, UIKit.UIAlertControllerStyle preferredStyle);
static member Create : string * string * UIKit.UIAlertControllerStyle -> UIKit.UIAlertController

Parameters

title
String

Title for the alert

This parameter can be null.

message
String

Message to display for the alert, this is optional.

This parameter can be null.

preferredStyle
UIAlertControllerStyle

The desired style for the alert.

Returns

The new instance of the UIAlertController that you can customize.

Attributes

Remarks

See the UIAlertController documentation for an example on how to use it.

Applies to