I want a modal view controller to be "preloaded" and displaying onscreen when the app starts, so I can have the company logo showing up and then slide offscreen (the disappearing animation of the "cover vertical" transition) after 2 seconds. So, I have the launch image set to the company logo graphic (fills the entire iPad screen), and I am trying to get it so that when the launch image disappears, there's another copy of the image behind it as a modal view controller.
But for some reason, unless I put the call to presentModalViewController in viewDidAppear, the method just doesn't do anything. Here's my code:
(IntroSplashViewController has a view with a single image view, the company logo)
Code:
IntroSplashViewController *isvc = [[IntroSplashViewController alloc] init];
[isvc setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
[self presentModalViewController:isvc animated:NO];
[isvc release];
NSLog(@"Modal View Controller: %@ isvc: %@",self.modalViewController,isvc);
[NSTimer scheduledTimerWithTimeInterval:2.0f target:self selector:@selector(dismissSplashScreen) userInfo:nil repeats:NO];
dismissSplashScreen just has dismissModalViewController in it.
When placed in any method aside from viewDidAppear, the NSLog logs:
Quote:
|
Modal View Controller: (null) isvc: <IntroSplashViewController: 0x151a90>
|
If I do put it in viewDidAppear, I see the main part of the app for a second before the splash screen (modal view controller) pops up...help?