UIAlertController
来源:互联网 发布:淘宝图片侵权赔偿标准 编辑:程序博客网 时间:2024/05/22 11:55
1、创建
UIAlertController* alertVc = [UIAlertController alertControllerWithTitle:@”温馨提示” message:@”你的手机没有网络” preferredStyle:UIAlertControllerStyleActionSheet];
2、显示
[self presentViewController:alertVc animated:YES completion:nil];
3、创建 UIAlertAction 按钮
/**
* @param title 按钮文字
*
* @param style 按钮样式
*
* @param handler block按钮点击后做的操作
*/
UIAlertAction* action = [UIAlertAction actionWithTitle:@”按钮文字” style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
}];
4、将按钮添加到alertVc
[alertVc addAction:action];
0 0
- UIAlertController
- UIAlertController
- UIAlertController
- UIAlertController
- UIAlertController
- UIalertController
- UIAlertController
- UIalertController
- UIAlertController
- UIAlertController
- UIAlertController
- UIAlertController
- UIAlertController
- UIAlertController
- UIAlertController
- UIAlertController
- UIAlertController
- UIAlertController
- c++第5次作业
- 装饰者模式、桥接模式、适配器模式
- 希尔排序算法
- swift 字典和数组
- Notification
- UIAlertController
- microstation level2 0404
- OC下载网页
- 进程与线程
- php 字符串
- Hibernate data validator in spring integration
- 第10、11周-项目3(1)
- Hadoop学习(四)— MapReduce入门
- python之urllib2使用总结