让应用程式开始并保持横向模式 [英] Make app start and remain in landscape mode

查看:165
本文介绍了让应用程式开始并保持横向模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以横向模式启动我的应用程式,并以这种方式保持屏幕旋转?

How can I start my app in landscape mode, and keep the screen rotation that way?

推荐答案

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
 return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || 
   interfaceOrientation == UIInterfaceOrientationLandscapeRight);
} 

这篇关于让应用程式开始并保持横向模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆