我正在创建一个应用程序,当用户进入页面时,会弹出一个警告视图,说明"点击按钮继续"。如何在视图控制器中显示警报视图一次?谢谢你的帮助。
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
let alertController = UIAlertController(title: "Info", message: "Click on the button to proceed", preferredStyle: UIAlertControllerStyle.alert)
let myBackSign = UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)
alertController.addAction(myBackSign )
self.present(alertController, animated: true, completion: nil)
}