I'm creating an alert but I can't dismiss it when the user presses OK. I'm getting the following error:
2017-12-28 07:03:50.301947-0400 Prestamo[691:215874] API error: <_UIKBCompatInputView: 0x10249adc0; frame = (0 0; 0 0); layer = > returned 0 width, assuming UIViewNoIntrinsicMetric
I was searching everywhere on the Internet but I couldn't find anything that helped me.
override func viewDidAppear(_ animated: Bool) {
createAlert(title: "Licencia2", message: "En el momento no tienes una licencia válida!")
}
func createAlert (title:String, message:String) {
let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: {(action) in
alert.dismiss(animated: false, completion: nil)
}))
self.present(alert, animated: false, completion: nil)
}
Any ideas would be appreciated