Value of UIKeyboardFrameEndUserInfoKey is a CGPoint on iOS 5

Originator:neocool2
Number:rdar://10192655 Date Originated:27-Sep-2011 04:26 PM
Status:Closed. Resolved:Fixed in iOS 6.
Product:iPad Product Version:5.0 / 9A5313e
Classification:Other Bug Reproducible:Always
 
27-Sep-2011 04:26 PM Boris Bügling:
Summary:

Upon receiving a UIKeyboardWillShowNotification, the userInfo dictionary of the NSNotifcation object contains a value for UIKeyboardFrameEndUserInfoKey. This value is of type CGRect on iOS 4.3, as expected by the name. However, the value is of type CGPoint on iOS 5 Beta 7

Steps to Reproduce:

1. Register for UIKeyboardWillShowNotification:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showKeyboard:) 
												 name:UIKeyboardWillShowNotification object:nil];

2. Implement the following selector:

-(void)showKeyboard:(NSNotification*)notification {
	NSValue* userInfoValue = [notification.userInfo objectForKey:UIKeyboardFrameEndUserInfoKey];
        NSLog(@"Type: %s", [userInfoValue objCType]);
}

Expected Results:

The type should be CGRect.

Actual Results:

The type is CGPoint.

Regression:

Yes, it worked as expected in iOS 4.3.

Notes: -

Comments


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!