1
votes

I have had a look online and at other questions but I cannot seem to solve my simple but annoying problem.

I am using assets.xcassets with a variety of different sized launch images. If I tick "Portrait" in my development info in my Xcode project game, the launch image shows perfectly.

However, my game is played in landscape mode! But when I untick "Portrait" mode, all I get is a black screen for the launch image!

I understand that Xcode cannot launch images in landscape mode. But is there any code I can use so that I can launch my launch screen in landscape mode?

Thanks :D

1
You may find useful reading this document (Launching Your iPhone Application in Landscape).Whirlwind

1 Answers

0
votes

I may recommend a tricky way, just design a landscape launch screen but put vertically for portrait mode, so it will work like landscape launch image, but actually it shows in portrait mode, then work for your all other views in landscape.

and in app delegate add this one:

func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow?) -> UIInterfaceOrientationMask {
    var orientation: UIInterfaceOrientationMask!
    orientation = [UIInterfaceOrientationMask.Landscape]
    return orientation
}