0

I have an app that supports both portrait and landscape.
So in Info.plist / Project Settings I specify both orientations.

In my UIViewController I override supportedInterfaceOrientations to return .landscape.

But when I launch my app it is first displayed in portrait mode (with wrecked layout), and then unpleasant animation rotates it to landscape (see video).

I also tried overriding application(_, supportedInterfaceOrientationsFor window) with the same result.

Sample project demonstrating the issue:
https://s3.amazonaws.com/glazba/OrientationTest.zip

Orientation issue video

1 Answer 1

1

Adding UIInterfaceOrientation in Info.plist and setting it to landscape seems to do the trick.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes, it does, but it disables portrait orientation entirely, despite supportedInterfaceOrientations in UIViewController :(
I can set .landscape in .plist and return .all in UIApplicationDelegate, but it will result in the same weird animation when launching in portrait :(

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.