monish
monish

Reputation: 1405

Keyboard notifications are not working in Iphone 4.0

I am getting the 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.

Upvotes: 1

Views: 592

Answers (1)

progrmr
progrmr

Reputation: 77191

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.

Upvotes: 3

Related Questions