Skip to content

Instantly share code, notes, and snippets.

@marshluca
Created December 9, 2010 02:05
Show Gist options
  • Save marshluca/734226 to your computer and use it in GitHub Desktop.
Save marshluca/734226 to your computer and use it in GitHub Desktop.
Splash in iOS
1. 将你需要的splash界面的图片,存成Default.png
2. 在XXXAppDelegate.m程序中,插入如下代码:
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//–insert a delay of 5 seconds before the splash screen disappears–
[NSThread sleepForTimeInterval:5.0];
// Override point for customization after application launch.
// Add the view controller’s view to the window and display.
[window addSubview:viewController.view];
[window makeKeyAndVisible];
return YES;
}
这样splash页面就停留5秒后,消失了。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment