gpt4 book ai didi

ios - iOS8/iOS8苹果系统键盘的高度是多少?

转载 作者:行者123 更新时间:2023-11-29 01:30:34 25 4
gpt4 key购买 nike

在 iOS 8 中,Apple 系统键盘的高度是多少,有和没有位于键盘顶部的预测文本栏?

最佳答案

使用

NSValue* keyboardFrame = [keyboardInfo valueForKey:UIKeyboardFrameEndUserInfoKey];

详细值

UIKeyboardWillChangeFrameNotification的观察者添加到viewDidLoad

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillChange:) name:UIKeyboardWillChangeFrameNotification object:nil];

委托(delegate)方法

- (void)keyboardWillChange:(NSNotification *)notification {
NSDictionary* keyboardInfo = [notification userInfo];
NSValue* keyboardFrame = [keyboardInfo valueForKey:UIKeyboardFrameEndUserInfoKey];
NSLog("value ==%@",keyboardFrame);
}

关于ios - iOS8/iOS8苹果系统键盘的高度是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33515655/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com