您的位置:首页 > 产品设计 > UI/UE

UIAlertController replaces the UIActionSheet and UIAlertView

2015-10-28 18:01 627 查看
UIAlertController

A UIAlertController object displays an alert message to the user. This class replaces the UIActionSheet and UIAlertView classes for displaying alerts. After configuring the alert controller with the actions and style you
want, present it using the presentViewController:animated:completion: method.


In addition to displaying a message to a user, you can associate actions with your alert controller to give the user a way to respond. For each action you add using the addAction: method, the alert controller configures a button with the action details. When
the user taps that action, the alert controller executes the block you provided when creating the action object.

When configuring an alert with the UIAlertControllerStyleAlert style, you can also add text fields to the alert interface. The alert controller lets you provide a block for configuring your text fields prior to display. The alert controller maintains a reference
to each text field so that you can access its value later.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息