swift 弹窗

直接拷贝使用即可

let alert = UIAlertController(title:nil,message:"输入不能为空",preferredStyle: .Alert)

let okAction = UIAlertAction(title: "OK", style: .Default, handler: nil)
            
alert.addAction(okAction)

self.presentViewController(alert, animated: true, completion: nil)

 

"输入不能为空"  可以替换为字符变量

posted on 2016-10-25 10:04  麦芽呀~  阅读(431)  评论(0编辑  收藏  举报