简体   繁体   English

如何检测iOS 8中键盘的高度是否发生了变化?

[英]How can I detect if the height of the keyboard has changed in iOS 8?

On iOS 8, keyboards can be different heights. 在iOS 8上,键盘可以达到不同的高度。 When the user switches between keyboards, or changes the height of the current keyboard, how can I detect this? 当用户在键盘之间切换或更改当前键盘的高度时,我该如何检测?

Listen to the UIKeyboardWillChangeFrameNotification notification. 收听UIKeyboardWillChangeFrameNotification通知。

Use UIKeyboardFrameBeginUserInfoKey and UIKeyboardFrameEndUserInfoKey values in the passed userInfo dictionary to retrieve the current and future frame of the keyboard. 在传递的userInfo字典中使用UIKeyboardFrameBeginUserInfoKeyUIKeyboardFrameEndUserInfoKey值来检索键盘的当前和未来帧。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Xamarin iOS中更改键盘的高度? - How can I change the height of the keyboard in Xamarin iOS? 如何使用Swift在iOS中检测多行键盘粘贴事件? - How can I detect a multiline keyboard paste event in iOS with Swift? iOS-检测软件键盘高度 - iOS - detect software keyboard height iOS如何在输入视图更改时获取键盘高度? - iOS How to get keyboard height when the inputview is changed? 在iOS应用程序中,如何检测到用户已按下外部键盘上的箭头键之一? - Within an iOS app how do I detect that the user has pressed one of the arrow keys on their external keyboard? iOS7用Javascript检测键盘高度? - iOS7 Detect keyboard height with Javascript? 如何获得键盘的高度? - How can I get the keyboard's height? 在应用运行时,如何检测用户是否更改了iPhone系统语言设置? - How can I detect if a user has changed the iPhone system language settings while the app is running? 如果用户向上滚动控制中心,如何从iOS键盘扩展中检测到? - How can I detect from iOS Keyboard extension if user scrolled up the Control Center? 如何在iOS的蓝牙键盘中检测何时按下播放按钮 - How can i detect when play button is pressed in a bluetooth keyboard in iOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM