In my app, there’s an introductory splash video that plays before the user sees the tab bar view. Adding the video was a last minute decision on my part, so my app delegate is currently set up to load the tab bar controller first and foremost.
I’ve tried to minimize the amount of code refactoring needed to have the video load first by adding the following code early in application didFinishLaunchingWithOptions in the app delegate:
[self performSelector:@selector(splashVideo:) withObject:nil afterDelay:0.0];
Which goes to this method…
- (void)splashVideo:(id)sender {
url = [[NSBundle mainBundle] URLForResource:@"splashsmall" withExtension:@"m4v"];
moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
moviePlayerController.moviePlayer.controlStyle = MPMovieControlStyleNone;
[homeViewController presentModalViewController:moviePlayerController animated:NO];
}
This works very well, though you can still, on occasion, see the tab bar controller for a split second before the video loads.
My question is: is there a guaranteed way to prevent the tab bar controller from being visible until after the video has played? Am I going to have to cut up the code in some drastic way?
Thanks in advance.
According to Apple’s Human Interface Guidelines, your app may be rejected if you show unnecessary loading screens at application launch.
Edit:
Have you tried: