2

Possible Duplicate:
Displaying splash screen for longer than default seconds

I am developing a simple game from an open source xcode project.

I am a complete beginner in xcode, and I don't know anything.

The splash screen lasts while the game is loading, but the game is so simple that the splash sscreen stays on the screen about half a second.

I don't want that, I would like it to stay for about 5 seconds.

Thanks.

Community
  • 1
  • 1
Amar Syla
  • 3,523
  • 3
  • 29
  • 69

3 Answers3

4

You should no delay the splash screen, since it's not splash screen. it's place holder for the app while is it loading.

If you read the Apple HIG you will read that delaying it is not allowed.

If you think that following these guidelines will result in a plain, boring launch image, you’re right. Remember, the launch image is not meant to provide an opportunity for artistic expression; it is solely intended to enhance the user’s perception of your app as quick to launch and immediately ready for use.

rckoenes
  • 69,092
  • 8
  • 134
  • 166
  • It's okay, I fixed it, I just added this line of code: `sleep(10);` under the: `- (void) applicationDidFinishLaunching:(UIApplication*) application {` in the: AppDelegate.m It seems to work good for now. Anyways, thanks for your answes. – Amar Syla Aug 22 '12 at 14:44
  • 5
    You should not do that, there is a process called watchdog which checks if you app starts in time. If you app takes to long to start it will be killed. This watchdog service only runs on appstore build not on development builds. ***NEVER EVER delay the `applicationDidFinishLaunching:`*** – rckoenes Aug 22 '12 at 14:56
1

Render same loading screen from code at launch till ur loading completes.

Guru
  • 21,652
  • 10
  • 63
  • 102
  • 2
    It's okay, I fixed it, I just added this line of code: sleep(10); under the: - (void) applicationDidFinishLaunching:(UIApplication*) application { in the: AppDelegate.m It seems to work good for now. Anyways, thanks for your answes. – Amar Syla Aug 22 '12 at 14:45
  • @AmarSyla, ok. u got alternate solution right...Happy Coding. – Guru Aug 22 '12 at 16:16
1

Duplicate of: Displaying splash screen for longer than default seconds

You don't need the splashscreen to last longer. You need to make a UIViewController which shows the splashscreen a little longer. You can also show the user what your app is doing (the loading stuff) then, which fits better in the Apple way of thinking.

Community
  • 1
  • 1
Totumus Maximus
  • 7,543
  • 6
  • 45
  • 69
  • It's okay, I fixed it, I just added this line of code: sleep(10); under the: - (void) applicationDidFinishLaunching:(UIApplication*) application { in the: AppDelegate.m It seems to work good for now. Anyways, thanks for your answes. – Amar Syla Aug 22 '12 at 14:44
  • It might seem like a fix, but it's not the way you should go. You are deceiving users into doing something useful. Listen to the rckoenes guy and apply that first screen that is suggested in the link. – Totumus Maximus Aug 22 '12 at 15:25
  • 1
    sleep(10); is a nice quick and dirty hack - not for production code, of course, but very handy for ensuring that the LaunchScreen is correctly laid out. Hopefully, of course, it won't be seen for more than a second (and maybe even less), but you wouldn't want it looking junky in that short while. Just a handy debugging tool. – headbanger Feb 04 '16 at 10:57