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.
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.
相关文章推荐
- 在 Swift 中测试 UIAlertController的方法
- iphone:自定义UIAlertView
- 在iOS 8中使用UIAlertController
- [Swift]UIKit学习之警告框:UIAlertController和UIAlertView
- 兼容iOs7的自定义alertView
- iOS 8 UIAlertController 控件
- UIAlertView的基本使用和对话框中按钮的事件处理方法
- UIButton,UIAlertView
- UIAlertView&UIActionSheet
- UIAlertView、UIActionSheet
- UIAlertView is deprecated in iOS 8.
- iOS中消息框提示的出现与自动消失
- UIAlertView 实现自动消失
- iOS中自动消失提示框的实现
- iOS开发系列--视图切换
- iOS9 UIAlertView的简单使用
- iOS最好用的弹出框
- UIActionSheet,UIAlertView,UISlider,UIProgressView,UISwitch,UISegmentControl,UIActivityIndicatorView基
- cordys static value 和 read from message