The application animates from portrait to landscape

My application is configured to support landscape only orientation (iPad): in my .plis I set the supported interface orientation to Landscape (left && right) in my project, I checked only the two orientations mentioned above in my main view controller I installed

- (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } -(bool)shouldAutorotate { return YES; } 

After starting the application, he always flings animation of rotation from portrait to landscape. This is the first thing I see, rotation from the landscape, and after that everything looks great. This is the same on the device and on the simulator. If I check "switch slow animation" in the simulator options, I can clearly see that the interface changes orientation from the portrait during startup.

I do not use a screensaver (if that matters)

No matter what I do, I tilt the seam to get rid of this behavior, and it looks pretty annoying. Has anyone seen this behavior, and please, someone has some advice. Thanks in advance.

+8
objective-c xcode ios7
source share
2 answers

Having tried all the possible settings for the user interface, in plist and in the code and eliminating all this as a possible cause of my problem, I began to analyze my storyboard and was able to isolate the problem in my code. I forgot to write [UIView commitAnimations]; after [UIView beginAnimations ...]. A small but cruel mistake, it almost drove me crazy. Thank you all for your help ...

0
source share

Without looking at the code and project settings, everything will simply startle in the dark. If it is not listed in the link below, then you are likely to redefine functionality somewhere between the code, the project settings, and the interface constructor. This link does not apply to iOS7, but much of the functionality is the same, only some user interface changes:

Launch iPhone app in landscape

In addition, when it comes to project parameters with any project that has been working for a long time, if I can’t get something to work on regarding project parameters, I always make a new clean project, make it work there or by default, and then look at what kind of project settings this is, as I discovered that the user interface and basic settings files, such as plists, can easily go out of sync after a year or two of the settings.

+1
source share

All Articles