码迷,mamicode.com
首页 > 移动开发 > 详细

UIAlertController 控制器多能用法 ios8新

时间:2014-11-25 18:48:39      阅读:267      评论:0      收藏:0      [点我收藏+]

标签:ios、swif、文启领航、flex

 

bubuko.com,布布扣

bubuko.com,布布扣



var alert:UIAlertController = UIAlertController(title: "确定不玩了嘛?", message: "", preferredStyle: UIAlertControllerStyle.ActionSheet)

        //UIAlertControllerStyle.ActionSheet

        //UIAlertControllerStyle.Alert

        

        var action1 = UIAlertAction(title: "确定", style: UIAlertActionStyle.Destructive) { (action) -> Void in

            println("exe");

        }

        var action2 = UIAlertAction(title: "取消", style: UIAlertActionStyle.Cancel) { (action) -> Void in

            println("Cancel");

        }

        

        alert.addAction(action1);

        alert.addAction(action2);

        

        self.presentViewController(alert, animated: true) { () -> Void in

            println(11);

        }





UIAlertController 控制器多能用法 ios8新

标签:ios、swif、文启领航、flex

原文地址:http://9232578.blog.51cto.com/9222578/1582486

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!