My app is set to support just landscape (iPad) orientation: in my .plis I have set supported interface orientation to Landscape (left && right) in my project I have checked just the two orientations mentioned above in my main view controller I have set
我的应用程序设置为仅支持横向(iPad)方向:在我的.plis中我已将支持的界面方向设置为横向(左和右)在我的项目中我已经在我的主视图控制器中检查了上面提到的两个方向我已设置
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
-(bool)shouldAutorotate
{
return YES;
}
After I run the app it always seams to animate rotation from portrait to landscape. That is the first thing that I see, the rotation from landscape and after that everything looks fine. It is the same on device and on simulator. If I check "toggle slow animations" in simulator option I can clearly see that the interface changes orientation from portrait during launch.
在我运行应用程序后,它总是接缝到从纵向到横向的旋转动画。这是我看到的第一件事,从风景旋转,之后一切看起来都很好。它在设备和模拟器上是相同的。如果我在模拟器选项中检查“切换慢动画”,我可以清楚地看到界面在启动期间从纵向改变方向。
I am not using splash screen (if that matters)
我没有使用闪屏(如果重要的话)
No matter what I do, I cant seam to get rid of that behaviour, and it looks pretty annoying. Has anyone seen this kind of behaviour, and please does anyone have some advice. Thanks in advance.
无论我做什么,我都无法摆脱这种行为,看起来很烦人。有没有人见过这种行为,请有人提出一些建议。提前致谢。
2 个解决方案
#1
1
Without seeing code and project settings, anything would just be a stab in the dark. If it's not listed in the link below, then it's likely you are overriding functionality somewhere between code, project settings, and interface builder. This link isn't iOS7 specific, but much of the functionality is the same, just some UI changes:
如果没有看到代码和项目设置,任何事情都会在黑暗中被刺伤。如果它未在下面的链接中列出,那么您可能会在代码,项目设置和界面构建器之间的某处覆盖功能。此链接不是iOS7特定的,但大部分功能都是相同的,只是一些UI更改:
Launching your iPhone Application in Landscape
在Landscape中启动iPhone应用程序
Also, when it comes to project settings with any long running project, if I can't get something to work relating to project settings, I always make a new clean project, get it to work in there, or by default, and then look at what that project's settings are, as I've found that UI and underlying settings files, like plists can easily get out of sync after a year or two of tweaking.
此外,当涉及任何长期运行项目的项目设置时,如果我无法获得与项目设置相关的工作,我总是创建一个新的清洁项目,让它在那里工作,或默认情况下,然后看看在该项目的设置是什么,因为我发现UI和底层设置文件,如plist在一两年的调整后很容易失去同步。
#2
0
After trying all possible settings for the UI, in plist and in code and eliminating all that as a possible cause for my problem I started dissecting my storyboard and managed to isolate problem in my code. I forgot to write [UIView commitAnimations]; after [UIView beginAnimations...]. Small but brutal error it nearly drove me mad. Thank you all for helping...
在尝试了UI的所有可能设置之后,在plist和代码中消除了所有这些可能导致我的问题的原因,我开始剖析我的故事板并设法隔离我的代码中的问题。我忘了写[UIView commitAnimations];在[UIView beginAnimations ...]之后。小而残酷的错误几乎让我发疯。谢谢大家帮忙......
#1
1
Without seeing code and project settings, anything would just be a stab in the dark. If it's not listed in the link below, then it's likely you are overriding functionality somewhere between code, project settings, and interface builder. This link isn't iOS7 specific, but much of the functionality is the same, just some UI changes:
如果没有看到代码和项目设置,任何事情都会在黑暗中被刺伤。如果它未在下面的链接中列出,那么您可能会在代码,项目设置和界面构建器之间的某处覆盖功能。此链接不是iOS7特定的,但大部分功能都是相同的,只是一些UI更改:
Launching your iPhone Application in Landscape
在Landscape中启动iPhone应用程序
Also, when it comes to project settings with any long running project, if I can't get something to work relating to project settings, I always make a new clean project, get it to work in there, or by default, and then look at what that project's settings are, as I've found that UI and underlying settings files, like plists can easily get out of sync after a year or two of tweaking.
此外,当涉及任何长期运行项目的项目设置时,如果我无法获得与项目设置相关的工作,我总是创建一个新的清洁项目,让它在那里工作,或默认情况下,然后看看在该项目的设置是什么,因为我发现UI和底层设置文件,如plist在一两年的调整后很容易失去同步。
#2
0
After trying all possible settings for the UI, in plist and in code and eliminating all that as a possible cause for my problem I started dissecting my storyboard and managed to isolate problem in my code. I forgot to write [UIView commitAnimations]; after [UIView beginAnimations...]. Small but brutal error it nearly drove me mad. Thank you all for helping...
在尝试了UI的所有可能设置之后,在plist和代码中消除了所有这些可能导致我的问题的原因,我开始剖析我的故事板并设法隔离我的代码中的问题。我忘了写[UIView commitAnimations];在[UIView beginAnimations ...]之后。小而残酷的错误几乎让我发疯。谢谢大家帮忙......