可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
Although I currently only have one app out in the App store, I have several in the works and was wondering how users are making their splash screens.
I have seen several very cool animated ones and was wondering if this was all done via code or is it just something you would make in possibly iMovie and just run it as a video.
Any idea how some of these are being created? Examples are anything from Time Warner Cables app to Bejeweled.
Thanks in advance for the info.
Geo...
回答1:
See iPhone Animated Loading Screen <-- the answer in there seems to be that the "fancy" splash screens aren't actually loading screens.
So what you will have to do is to create an animation (maybe a movie clip, or an imageview animation or similar) that can be run when the app starts artifically, possibly with you loading your resources behind that, rather than using the default splash screen functionality (to speed up the start of your app).
Hope that helps
回答2:
Try this in App delegate class ....
- (void)applicationDidFinishLaunching:(UIApplication *)application { UIImage *splashImage = [UIImage imageNamed:@"Picture 2.png"]; splashImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 20, 320, 480)]; splashImageView.contentMode = UIViewContentModeScaleAspectFit; splashImageView.image = splashImage; [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(removeSplashScreen) userInfo:nil repeats:NO]; [window addSubview:splashImageView]; } -(void)removeSplashScreen{ [UIView beginAnimations: nil context:nil]; [UIView setAnimationDuration:2.0]; splashImageView.alpha = 0.0; [UIView commitAnimations]; [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(releaseSplashScreen) userInfo:nil repeats:NO]; } -(void)releaseSplashScreen{ [splashImageView removeFromSuperview]; [splashImageView release]; //Load the rootviewController here }
You can also include Default.png in the resource of the project
回答3:
There's a couple chapters on custom splash screens in Drance & Warren's book 'iOS Recipies' from Pragmatic Bookshelf.
Perhaps a commercial plug isn't what you're seeking (I'm not affiliated the the title or publisher), I just remember reading through it and finding it interesting.
回答4:
You can do a fancy splash screen if you made it on the first view controller, like your real splash screen is the first scene of your animation, and the first view controller is the complete animation then you dismiss the first controller or you push the main view controller after a delay from you first view controller.