I am getting the开发者_Python百科 problem in the keyboard notifications When I played in 4.0.that the keyboard notifications are not working but its working fine in 3.0.
can anyone suggest why this is happening like this?
Thank you, Monish.
I just checked, this is the code in my app used to subscribe to one of the notifications and it works in 3.x and 4.0:
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(keyboardWillShow:)
name: UIKeyboardWillShowNotification
object: nil];
And from NSLog inside keyboardWillShow:
2010-06-21 08:32:55.750 ClockSmith[3773:307] -[GMTableView keyboardWillShow:] size={320, 216} NSConcreteNotification 0x1de970 {name = UIKeyboardWillShowNotification; userInfo = {
UIKeyboardAnimationCurveUserInfoKey = 0;
UIKeyboardAnimationDurationUserInfoKey = "0.300000011920929";
UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {320, 216}}";
UIKeyboardCenterBeginUserInfoKey = "NSPoint: {160, 588}";
UIKeyboardCenterEndUserInfoKey = "NSPoint: {160, 372}";
UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 480}, {320, 216}}";
UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 264}, {320, 216}}";
}}
Do you have handlers in your UITableView (I put them in a subclass) or in your UIViewController that subscribe to these notifications? Check your addObserver code.
精彩评论