提示框

作者: iOS_July | 来源:发表于2018-06-11 10:37 被阅读14次

target:点击按钮---->屏幕中间弹出提示框

let alertAC = UIAlertController(title: "提示", message: "您点击切换了背景色", preferredStyle: .alert)

let trueBtn = UIAlertAction(title: "好的", style: .default, handler: nil)

alertAC.addAction(trueBtn)
        
self.present(alertAC, animated: true, completion: nil)   

target:点击按钮---->屏幕底部弹出提示框

let alertAC = UIAlertController(title: "提示", message: "您点击切换了背景色", preferredStyle: .alert)

let trueBtn = UIAlertAction(title: "好的", style: .actionSheet, handler: nil)

alertAC.addAction(trueBtn)
        
self.present(alertAC, animated: true, completion: nil)   

相关文章

网友评论

    本文标题:提示框

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