美文网首页
swift UIAlertController的使用

swift UIAlertController的使用

作者: 今天天气很好嗯 | 来源:发表于2017-11-10 15:59 被阅读0次

 let alert = UIAlertController.init(title: "温馨提示", message: "you touch me", preferredStyle: UIAlertControllerStyle.alert)        

alert.addAction(UIAlertAction(title: "确定", style: UIAlertActionStyle.default, handler: { result in             print("你点击确定")         }))        

alert.addAction(UIAlertAction(title: "取消", style: UIAlertActionStyle.cancel, handler: { result in             print("你点击取消")         }))                 

self.present(alert, animated: true) {                      }

相关文章

网友评论

      本文标题:swift UIAlertController的使用

      本文链接:https://www.haomeiwen.com/subject/frgbmxtx.html