首页 > 移动平台 > 详细

ios UIAlertController 的用法

时间:2015-12-25 17:05:44      阅读:176      评论:0      收藏:0      [点我收藏+]
 1 UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"您确定要删除该商品吗?" preferredStyle:UIAlertControllerStyleAlert];
 2     UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
 3         NSLog(@"取消");
 4     }];
 5     
 6     UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
 7         NSLog(@"确定");
 8     }];
 9     
10     [alert addAction:cancelAction];
11     [alert addAction:okAction];
12     [self presentViewController:alert animated:YES completion:nil];

 

ios UIAlertController 的用法

原文:http://www.cnblogs.com/codemakerhj/p/5076156.html

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