Several UIAlertViews for a delegate

Tag the UIAlertViews like this: #define kAlertViewOne 1 #define kAlertViewTwo 2 UIAlertView *alertView1 = [[UIAlertView alloc] init… alertView1.tag = kAlertViewOne; UIAlertView *alertView2 = [[UIAlertView alloc] init… alertView2.tag = kAlertViewTwo; and then differentiate between them in the delegate methods using these tags: – (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if(alertView.tag == kAlertViewOne) { // … } else if(alertView.tag … Read more

Unable to add UITextField to UIAlertView on iOS7…works in iOS 6

You can’t easily alter the view hierarchy of a UIAlertView in iOS 7. (Nor should you; the documentation specifically tells you not to.) Head over to the developer forums to see a long discussion about it. One alternative in your case is to set alert.alertViewStyle = UIAlertViewStylePlainTextInput; This will add a text field for you. … Read more