首页 > 移动平台 > 详细

【iOS】UIAlertController

时间:2016-06-13 17:12:20      阅读:238      评论:0      收藏:0      [点我收藏+]

 

 

 

    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示"
                                                                   message:@"确定要删除?"
                                                            preferredStyle:UIAlertControllerStyleAlert];

    [alert addAction:[UIAlertAction actionWithTitle:@"取消"
                                              style:UIAlertActionStyleCancel
                                            handler:^(UIAlertAction *action){NSLog(@"点击了取消按钮");}]];
    [alert addAction:[UIAlertAction actionWithTitle:@"确定"
                                              style:UIAlertActionStyleDefault
                                            handler:^(UIAlertAction *action){NSLog(@"点击了确定按钮");}]];    
    [self presentViewController:alert animated:YES completion:nil];

 

效果图如下:

技术分享

 

【iOS】UIAlertController

原文:http://www.cnblogs.com/jaxer/p/5581211.html

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