"Show splash screen during loading"

Mon 11 May 2009

//In AppDelegate.m

- (void)applicationDidFinishLaunching:(UIApplication *)application {

 

m_viewController = [[SplashViewController alloc] initWithNibName:nil bundle:nil];

[window addSubview:m_viewController.view];

[window makeKeyAndVisible];

 

//set delay before showing new screen

[NSTimer scheduledTimerWithTimeInterval:5.0f target:self selector:@selector(onSlashScreenExpired:) userInfo:nil repeats:NO];

}

 

- (void)onSlashScreenExpired:(id)userInfo{

[m_viewController.view removeFromSuperview];

[window addSubview:[navigationController view]];

[window makeKeyAndVisible];

}