iOS developer iOS developer - 1 year ago 140
iOS Question

Change iPhone splash screen time

How would I make the splash screen stay for longer, 5 seconds, for example?

Answer Source

You need to create a view controller for displaying the splash screen as done below.

   - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        [self generateRandomSplashScreen];

        [self performSelector:@selector(removeSplashScreen) withObject:nil afterDelay:SPLASHSCREEN_DELAY];

    [self otherViewControllerLoad]; // the other view controller

        [self.window makeKeyAndVisible];
        return YES;
    -(void) generateRandomSplashScreen
        splashScreenViewController = [[SplashScreenController alloc] initWithNibName:@"SplashScreenController" bundle:[NSBundle mainBundle]];

        [self.window addSubview:self.splashScreenViewController.view];

    -(void) removeSplashScreen
        [splashScreenViewController.view removeFromSuperview];
        self.window.rootViewController = self.tabBarController;
        [splashScreenViewController release];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download