简体   繁体   English

Ipad和Iphone

[英]Ipad and Iphone

For the latest version of IOS8, I have my app mostly in portrait mode but few screens where user needs to write text where keyboard populates , i want user to be able to switch to landscape mode. 对于最新版本的IOS8,我的应用程序大多数处于纵向模式,但是用户需要在键盘填充的地方写一些屏幕,我希望用户能够切换到横向模式。 How is this possible? 这怎么可能?

You could implement the supportedInterfaceOrientations method for those specific controllers and specify which orientations are allowed. 您可以为那些特定的控制器实现supportedInterfaceOrientations方法,并指定允许的方向。

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscape | UIInterfaceOrientationMaskPortrait;
}

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

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