0
votes

I am using Cocos2d and Xcode 4. My app currently displays the launch image in portrait mode, then switches to landscape so the image is on its side, then launches the app. How can I: 1. Make it run the launch image for a certain duration. 2. Make it display it in Landscape mode, not portrait. Any Help is appreciated. Thanks!

5

5 Answers

1
votes

Can't you just make your image in landscape and use that? Basically like what zeiteisen said.

Just open up gimp or photoshop and make a new image: 480w X 320h.

0
votes

To make your launch image display in landscape mode, simply append -Landscape to its filename (e.g. change LaunchImage.png to LaunchImage-Landscape.png).

As for showing your launch image for a certain duration, you have two options: display a "launch image" view controller initially and dismiss it after the desired duration (allows you to fade the image out, etc.), or simply call sleep() in your app delegate's application:didFinishLaunchingWithOptions:. It's important to note that you have no control over how long the OS displays your launch image before control is passed to your app delegate—you need to take this into consideration.

0
votes

Just rotate the Default.png in your favourite image editor like Photoshop.

0
votes

I had a similar problem and fixed it by changing the view to landscape in Interface Builder. Mine is still animating though from the initial portrait orientation of the Window (not settable to landscape in IB).

0
votes

In AppDelegate applicatio:didFinishLaunchingWithOptions there is a call to [director_ pushScene: [IntroLayer scene]]. In there, it shamelessly loads the splash screen again and displays it rotated by 90 degrees:

    if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ) {
        background = [CCSprite spriteWithFile:@"Default.png"];
        background.rotation = 90;
    }

Removing this fixes the rotating splash screen problem.