iOS 8以后Apple System键盘的高度是多少?没有位于键盘顶部的预测文本栏?
答案 0 :(得分:1)
使用
NSValue* keyboardFrame = [keyboardInfo valueForKey:UIKeyboardFrameEndUserInfoKey];
详细值
将UIKeyboardWillChangeFrameNotification
的观察者添加到viewDidLoad
;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillChange:) name:UIKeyboardWillChangeFrameNotification object:nil];
委托方法
- (void)keyboardWillChange:(NSNotification *)notification {
NSDictionary* keyboardInfo = [notification userInfo];
NSValue* keyboardFrame = [keyboardInfo valueForKey:UIKeyboardFrameEndUserInfoKey];
NSLog("value ==%@",keyboardFrame);
}