I have this code, but I dont know how to show a textfield inside the UIAlertView.
var altMessage = UIAlertController(title: \"Warning\", message: \"This is A
var inputTextField: UITextField?
//Create the AlertController
let actionSheetController: UIAlertController = UIAlertController(title: "Rename", message: "", preferredStyle: .Alert)
//Create and add the Cancel action
let cancelAction: UIAlertAction = UIAlertAction(title: "Cancel", style: .Cancel) { action -> Void in
//Do some stuff
}
actionSheetController.addAction(cancelAction)
//Create and an option action
let nextAction: UIAlertAction = UIAlertAction(title: "OK", style: .Default) { action -> Void in
//Do some other stuff
}
actionSheetController.addAction(nextAction)
//Add a text field
actionSheetController.addTextFieldWithConfigurationHandler { textField -> Void in
// you can use this text field
inputTextField = textField
}
//Present the AlertController
self.presentViewController(actionSheetController, animated: true, completion: nil)