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)
网友评论