How to get the keyboard height for portrait and landscape in IPhone and IPad


I want to handle keyboard notifications to move textfield up and down on tap of it in portrait as well as landscape to get the height of keyboard in portrait and landscape to achieve this?

use this code

- (void)keyboardWillShow:(NSNotification*)note {
      NSDictionary* info = [note userInfo];
      CGSize _kbSize = [[info objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
      float kbHeight = _kbSize.width > _kbSize.height ? _kbSize.height : _kbSize.width;

it will work in all the cases. Let me know if it works.