0

I am creating an app where when the user enters the page, an alert view pops up saying "Click on the button to proceed". How can I make the alert view show once in the view controller? Thanks for any help.

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)
}
rmaddy
  • 314,917
  • 42
  • 532
  • 579

0 Answers0