0


I have replaced the iOS keyboard with a my own view. Now I have a requirement to get the size of the default iOS keyboard that I have replaced earlier.But the UIKeyboardDidShowNotification is giving the size of my custom view. Not the size of the default iOS keyboard. Is there any way to get the size of iOS default keyboard size despite it is currently replaced by some other view.
Any help will be highly regarded.

- (void)someMethodWhereYouSetUpYourObserver
{
    // This could be in an init method.
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myNotificationMethod:) name:UIKeyboardDidShowNotification object:nil];<br>
}

- (void)myNotificationMethod:(NSNotification*)notification
{
    NSDictionary* keyboardInfo = [notification userInfo];
    NSValue* keyboardFrameBegin = [keyboardInfo valueForKey:UIKeyboardFrameBeginUserInfoKey];
    CGRect keyboardFrameBeginRect = [keyboardFrameBegin CGRectValue];<br>
}

Above mentioned method is not giving the size of the default keyboard size. Because I have replaced the default key board with my view. What I want is the dimensions of previously replaced keyboard size. Not the current one.

Raptor
  • 53,206
  • 45
  • 230
  • 366
deltaaruna
  • 528
  • 6
  • 24
  • 1
    refer http://stackoverflow.com/questions/3546571/how-to-get-uikeyboard-size-with-apple-iphone-sdk – Nilesh Patel Oct 03 '13 at 13:43
  • 1
    considering you replaced the original object, thus it never exists anymore, I am not sure on that. but you may find something useful in here https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html – mcy Oct 03 '13 at 13:50
  • @Nilesh That method is giving the current key board size. I have replaced the default keyboard with a my view. What I want is the replaced keyboard size, which is the iOS inbuilt keyboard size not the size of new keyboard view size. – deltaaruna Oct 10 '13 at 06:13

0 Answers0