Thursday, December 30, 2010

Display your splash screen just a bit longer on iOS

It took me awhile to find this line of code. In your AppDelegate.m just sleep for a few seconds in the "didFinishLaunchingWithOptions" delegate.

/*
 * AppDelegate.m
 */
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
 
    [NSThread sleepForTimeInterval:3.0];

    // Add the view controller's view to the window and display.
    [self.window addSubview:viewController.view];
    [self.window makeKeyAndVisible];

    return YES;
}

1 comment:

  1. Thank You! I couldn't find this line for some reason. You just made my life a little easier.

    ReplyDelete