Show splash screen during loading

by alex 14. February 2009 13:25

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

}

 

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

General

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen