Reputation: 1039
What is the height of the Apple System Keyboard in iOS 8 onwards with & without the predictive text bar which lies on top of the keyboard?
Upvotes: 0
Views: 60
Reputation: 82766
Use
NSValue* keyboardFrame = [keyboardInfo valueForKey:UIKeyboardFrameEndUserInfoKey];
for detail value
Add an observer of UIKeyboardWillChangeFrameNotification
to the viewDidLoad
;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillChange:) name:UIKeyboardWillChangeFrameNotification object:nil];
the delegate method
- (void)keyboardWillChange:(NSNotification *)notification {
NSDictionary* keyboardInfo = [notification userInfo];
NSValue* keyboardFrame = [keyboardInfo valueForKey:UIKeyboardFrameEndUserInfoKey];
NSLog("value ==%@",keyboardFrame);
}
Upvotes: 1