iOS9 alert问题
2015-10-10 10:51
609 查看
iOS9之后alertview不让用啦,用UIAlertController吧
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"警告" message:@"xxxxxxx" preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}]];
[alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
}]];
[self presentViewController:alert animated:YES completion:^{
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// [self dismissViewControllerAnimated:YES completion:nil];
// });
}];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"警告" message:@"xxxxxxx" preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}]];
[alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
}]];
[self presentViewController:alert animated:YES completion:^{
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// [self dismissViewControllerAnimated:YES completion:nil];
// });
}];
相关文章推荐
- IOS开发笔记(11)IOS开发之NSLog使用技巧
- iOS NSString 过滤非法字符串
- iOS定时器NStimer使用中传递参数
- js判断是否是PC,IOS,Android客户端
- iOS开发之详谈属性设置readwrite、readonly、retain、copy、assign、nonatomic
- iOS 9 学习系列:Split Screen Multitasking
- iOS关闭键盘的两种简单方法
- Nagios远程监控
- ios 上架与更新
- ***iOS开发中@selector的理解与应用
- iOS 顶部导航栏字体、颜色 底部tabbar颜色
- 重写barButton的set方法修改导航按钮的左右边距。
- <iOS>在哪里删除Provisioning Profiles
- iOS发送信息功能(生成信息内容)
- 【IOS 开发学习总结-OC-38】★ios入门 ——ios项目基础之知识点拾贝
- IOS 将16进制颜色转换成RGB
- iOS的IAP详解
- 沙盒(sandbox)路径——iOS8
- iOS帮助地址
- iOS Xcode中去掉中括号的方法