How to add a TextField to UIAlertView in Swift
I have this code, but I dont know how to show a textfield inside the UIAlertView. var altMessage = UIAlertController(title: "Warning", message: "This is Alert Message", preferredStyle: UIAlertControllerStyle.Alert) altMessage.addAction(UIAlertAction(title: "Done", style: UIAlertActionStyle.Default, handler: nil)) self.presentViewController(altMessage, animated: true, completion: nil) I have this code for textfield , how can I show this in UIAlerView var my:UITextField = UITextField(frame: CGRectMake(0, 0, 10, 10)) I also tried this code: var alert = UIAlertView() alert.title = "Enter Input"