0
У меня возникли проблемы с добавлением второго текстового поля в мой блок завершения. Может кто-нибудь, пожалуйста, покажите мне, как добавить еще одно текстовое поле. Я пытаюсь добавить self.newFirstNameInput = // это часть, которую я не понимаю?Добавить второе текстовое поле в UIAlert Swift 2
func insertNewObject(sender: AnyObject) {
let newNameAlert = UIAlertController(title: "Add New User", message: "What's the user's name?", preferredStyle: UIAlertControllerStyle.Alert)
newNameAlert.addTextFieldWithConfigurationHandler { (alertTextField) -> Void in
self.newLastNameInput = alertTextField
}
newNameAlert.view.setNeedsLayout()
newNameAlert.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Default, handler: nil))
newNameAlert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: addNewUser))
presentViewController(newNameAlert, animated: true, completion: nil)
}