Certain UIAlertViewDelegate Methods Are Never Called

Originator:nicolasgomollon
Number:rdar://14387317 Date Originated:09-Jul-2013 03:35 AM
Status:Closed Resolved:Yes
Product:iOS SDK Product Version:7.0 beta 3 (11A4414e)
Classification:Serious Bug Reproducible:Always
 
Summary:
When displaying a UIAlertView with a UITextField in iOS 7, the "alertViewShouldEnableFirstOtherButton:" method is never called when a change is made to the UITextField.

Steps to Reproduce:
1. Open Xcode
2. Create a new "Single View Application"
3. Open "ViewController.m"
4. In the "viewDidLoad" method, instantiate a UIAlertView, and set its "alertViewStyle" to "UIAlertViewStylePlainTextInput"
5. Implement the UIAlertViewDelegate "alertViewShouldEnableFirstOtherButton:" method in the view controller
6. Build and Run the Xcode project
7. Input some text into the UITextField

Expected Results:
The UIAlertViewDelegate "alertViewShouldEnableFirstOtherButton:" method should be called whenever a change is made to the UITextField.

Actual Results:
The UIAlertViewDelegate "alertViewShouldEnableFirstOtherButton:" method is never called.

Regression:
The expected result still functions in iOS 6, but is not working in iOS 7.

Notes:
Below is an example of the code required to reproduce the bug.

- (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView {
	NSLog(@"alertViewShouldEnableFirstOtherButton: was called!");
	return YES;
}

- (void)viewDidLoad {
	[super viewDidLoad];
	
	// Do any additional setup after loading the view, typically from a nib.
	UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"I’m an alert view!" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Next", nil];
	[alertView setAlertViewStyle:UIAlertViewStylePlainTextInput];
	[[alertView textFieldAtIndex:0] setDelegate:self];
	[alertView show];
}

Comments

30-Jul-2013 03:24 AM Nicolas Gomollon:

I can confirm that this issue has been fixed in iOS 7 beta 4 (11A4435d).

This issue has been verified as resolved and can be closed.

By nicolasgomollon at July 30, 2013, 10:30 a.m. (reply...)

29-Jul-2013 11:23 AM Apple Developer Bug Reporting Team :

Engineering has requested the following information in order to further investigate this issue:

Does this issue also occur with iOS 7 beta 4 (11A4435d)? Please verify with this release, and update your report with the results.

By nicolasgomollon at July 30, 2013, 10:27 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!