In my application I want a alert with a textfield. After clicking on \"Done\" I want to save the textfield input in a String. After clicking on \"Cancel\" I want only to clo
For iOS 8+ you should use UIAlertController instead of UIAlertView. To support iOS 7 you should implement (UIAlertViewDelegate):
func alertView(alertView: UIAlertView, clickedButtonAtIndex buttonIndex: Int) { //... let textField = alertView.textFieldAtIndex(0) }