Error showing a UIAlertView in swift

前端 未结 7 2029
独厮守ぢ
独厮守ぢ 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 06:46

    let alert = UIAlertController(title: "Title", message: "Message", preferredStyle: UIAlertController.Style.alert)
                        alert.addAction(UIAlertAction(title: "Ok", style: UIAlertAction.Style.default, handler: nil))
                        self.present(alert, animated: true, completion: nil)
    

提交回复
热议问题