如何强制我的应用程序在横向模式下启动UISplitViewController?
发布于 2010-10-14 21:12:03
在Info.plist文件中可以有不同的基于设备的设置。
我找到了一个example,里面谈到了让应用程序在横向模式下启动(取决于设备),如下所示:
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationPortrait</string>
<key>UIInterfaceOrientation~ipad</key>
<string>UIInterfaceOrientationLandscapeLeft</string> 第一个标签指的是iPhone,~iPad的标签指的是iPad。不确定这个链接是否对你有帮助,但这(我指的是Info.plist方式)绝对是可行的。
希望能有所帮助。
再见
乔瓦尼
发布于 2011-11-07 16:40:10
您可以始终使用此方法。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}发布于 2017-02-09 13:59:28
这是一个相当古老的问题,苹果已经更新了XCode来处理这种特定的情况。这些步骤在XCode 8.2.1中进行了测试。
在plist编辑器中,展开两种外形规格的支持接口(Phone/Touch是第一个):

然后,只需根据设备类型删除您不希望支持的。
https://stackoverflow.com/questions/3932213
复制相似问题