Error showing a UIAlertView in swift

前端 未结 7 2032
独厮守ぢ
独厮守ぢ 2021-02-20 06:11

Im trying to show a UIAlertView in my swift App

    alert = UIAlertView(title: \"\",
        message: \"bla\",
        delegate: self,
        cancelButtonTitle:         


        
相关标签:
7条回答
  • 2021-02-20 07:05

    Xcode 10, Swift 4.2 version

            let alert = UIAlertController(title: "Title", message: "Message", preferredStyle: UIAlertController.Style.alert)
            alert.addAction(UIAlertAction(title: "Button", style: UIAlertAction.Style.default, handler: nil))
            self.present(alert, animated: true, completion: nil)
    
    0 讨论(0)
提交回复
热议问题