简体   繁体   English

无需翻转即可更改键盘方向iOS设备

[英]Change Keyboard Orientation Without Flip The iOS device

I want to make the iOS device in a portrait mode and any keyboard will show in landscape mode. 我想将iOS设备设置为纵向模式,并且任何键盘都将以横向模式显示。 How can I manage such a thing? 我该如何处理? Thanks in advance. 提前致谢。

I would experiment with setting the status bar's orientation. 我将尝试设置状态栏的方向。 This would require special handling to assure that your views won't rotate, but the keyboard, popovers, action sheets, etc. all take the orientation of the application's status bar. 这将需要特殊的处理,以确保视图不会旋转,但是键盘,弹出窗口,操作表等均采用应用程序状态栏的方向。 Set the status bar's orientation like so: 如下设置状态栏的方向:

[[UIApplication sharedApplication] setStatusBarOrientation:newOrientation]

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM