Flipkart Search

Search This Blog

Friday, May 1, 2009

Splash Screen

Show splash screen during loading

//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];

}

No comments: