top of page
  • Writer's pictureRuben van Breda

User Alert

Display user an Alert




func ShowAlert(){

let alert = UIAlertController(title: "My Alert", message: "This is an alert.", preferredStyle: .alert)

alert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .default, handler: { _ in

NSLog("The \"OK\" alert occured.")

}))

self.present(alert, animated: true, completion: nil)

}



2 views0 comments

Recent Posts

See All

Comments


bottom of page