[英]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
字典中使用UIKeyboardFrameBeginUserInfoKey
和UIKeyboardFrameEndUserInfoKey
值来检索键盘的当前和未来帧。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.