如何在没有 UIViewController 的情况下旋转可见的 iOS 键盘
我有一个 UIWindow,里面有一个硬编码的 UIView。我更愿意保持这种状态,有没有一种好的方法可以旋转已经可见的键盘? 这个问题问同样的事情,所以我猜我真的想问 UIViewController 用于旋转键盘的 API 是否是私有 API。如果是的话我不会使用它,但我仍然对它是什么感兴趣。以及你是如何发现的。谢谢!
I have a UIWindow with a hard-coded UIView inside. I'd prefer to keep it that way, is there a nice way to rotate an already visible keyboard? This question asks the same thing, so I guess I'm really asking if the API used by UIViewController to rotate the keyboard is private API. I'm not going to use it if it is, but I'd still be interested in what it is. And how you found out. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UIViewController 为你处理旋转,你真的应该使用一个。不要尝试重新发明轮子,坚持最佳实践,您将避免很多不必要的工作。
https://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/AppArchitecture/AppArchitecture.html#//apple_ref/doc/uid/TP40007072-CH3-SW18
UIViewController handles the rotation for your, you really should use one. Don't try to reinvent the wheel, stick to the best practices and you will avoid a lot of unnecessary work.
https://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/AppArchitecture/AppArchitecture.html#//apple_ref/doc/uid/TP40007072-CH3-SW18