我正在尝试将我的应用的初始方向设置为UIInterfaceOrientationLandscapeLeft
我不能
'Initial interface orientation'[UIInterfaceOrientation]
Run Code Online (Sandbox Code Playgroud)
覆盖数组中的第一项
'Supported interface orientations'[UISupportedInterfaceOrientations]
Run Code Online (Sandbox Code Playgroud)
我注意到一个iphone应用总是以'Portrait(底部主页按钮)'开头.数组是:
'Supported interface orientations'[UISupportedInterfaceOrientations]
Portrait (bottom home button)
Landscape (left home button)
Landscape (right home button)
Run Code Online (Sandbox Code Playgroud)
这是预期的.
如果我在摘要页面上关闭PORTRAIT HOME BOTTOM按钮OFF THEN BACK ON然后数组的顺序改变而Portrait(底部主页按钮)移动到底部.
Landscape (left home button)
Landscape (right home button)
Portrait (bottom home button)
Run Code Online (Sandbox Code Playgroud)
当我运行应用程序时,它现在从横向(左主页按钮)开始,因为它现在是列表的顶部.哪个好
但
当我添加
'Initial interface orientation'[UIInterfaceOrientation]
Run Code Online (Sandbox Code Playgroud)
并将其设置为
Landscape (right home button)
Run Code Online (Sandbox Code Playgroud)
它被忽略,而数组中的第一项则被使用
Landscape (left home button)
Run Code Online (Sandbox Code Playgroud)
我检查了shouldAutorotateToInterfaceOrientation,它只阻止了肖像颠倒
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
return (interfaceOrientation != …Run Code Online (Sandbox Code Playgroud)