我们可以在 iphone os 4.0 中使用 UIKeyboardBoundsUserInfoKey 来代替

发布于 2024-09-12 03:10:43 字数 324 浏览 1 评论 0原文

大家好,我在我的应用程序中使用此代码。

CGRect keyBounds = [(NSValue *)[[通知 userInfo] objectForKey:UIKeyboardBoundsUserInfoKey] CGRectValue];

但 UIKeyboardBoundsUserInfoKey 在 iOS 4.0 中已被弃用

在 iOS 4.0 中使用 UIKeyboardFrameEndUserInfoKey 和 UIKeyboardFrameBeginUserInfoKey 但这些给出了不同的结果。

任何人都可以建议我为此做什么。

Hi all i am using this code in my application.

CGRect keyboardBounds = [(NSValue *)[[notification userInfo] objectForKey:UIKeyboardBoundsUserInfoKey] CGRectValue];

but UIKeyboardBoundsUserInfoKey is deprecated in iOS 4.0

i am using UIKeyboardFrameEndUserInfoKey and UIKeyboardFrameBeginUserInfoKey

in iOS 4.0 but these are giving different result.

can any one suggest me what to do for this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

多情癖 2024-09-19 03:10:43

这是我想出的一个解决方案,以及 Apple 开发人员的替代推荐。

Here is one solution that I came up with, along with an alternative recommendation from an Apple developer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文