UIAlertController 控制器多能用法 ios8新
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);
}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。