首页 > 移动平台 > 详细

iOS9 alert问题

时间:2015-10-10 12:11:53      阅读:2567      评论:0      收藏:0      [点我收藏+]

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];
// });
}];

iOS9 alert问题

原文:http://www.cnblogs.com/tongyuling/p/4866161.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!