UIAlertView itself is deprecated.
Instead, use a UIAlertController, and add an action for the button(s).
Perhaps something like:
let alertController = UIAlertController(title: "Title", message: "Message", preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: "Some action", style: .default) { (action: UIAlertAction) - Void in
// Code for button action...
})
alertController.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: