У меня есть UIAlertController, который предлагается пользователю, когда они выбирают "Enter Password" на экране TouchID. Как восстановить пользовательский ввод после представления этого на экране?
let passwordPrompt = UIAlertController(title: "Enter Password", message: "You have selected to enter your passwod.", preferredStyle: UIAlertControllerStyle.Alert)
passwordPrompt.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Default, handler: nil))
passwordPrompt.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
passwordPrompt.addTextFieldWithConfigurationHandler({(textField: UITextField!) in
textField.placeholder = "Password"
textField.secureTextEntry = true
})
presentViewController(passwordPrompt, animated: true, completion: nil)
Я знаю, что кнопка OK должна, вероятно, иметь обработчик, но сейчас этот код на самом деле ничего не делает, но я хочу отобразить вывод текстового поля через println. Это действительно просто тестовое приложение для меня, чтобы изучить Swift и некоторые новые материалы API.