iOS8/iOS8 Apple 系统键盘的高度是多少?
What is the height of the Apple System Keyboard in iOS8/iOS8?
iOS8 及更高版本的 Apple 系统键盘的高度是多少,带和不带位于键盘顶部的预测文本栏?
使用
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);
}
iOS8 及更高版本的 Apple 系统键盘的高度是多少,带和不带位于键盘顶部的预测文本栏?
使用
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);
}