开发者

I would like to flip my app's splash screen - how can I mimic the flipside controller's animation?

开发者 https://www.devze.com 2022-12-30 09:34 出处:网络
I\'ve finally gotten a working \"alpha\" version of my first app installed and (mostly) working on my iPhone 3G. So excited I came into the house and danced a little jig while my wife rolled her eyes

I've finally gotten a working "alpha" version of my first app installed and (mostly) working on my iPhone 3G. So excited I came into the house and danced a little jig while my wife rolled her eyes at me. Don't care - totally stoked that I figured it out on my own (with lots of help here - thanks again, guys).

I've never really dabbled with or cared about animatio开发者_开发知识库n; I'm more into utility-type apps. However, I've decided that I'd like to animate my app's opening image / default.png / splash screen similar to the flipside view controller animation - where the image spins from a view on the front to a different view on the back. I've found code for animating between views using the flipside animation, but how would I go about animating from a static *.png image to my navigation-based table view? I'm just not even sure where to start with this one - literally the first time I've ever even searched for anything graphics-related in the documentation.

Any help will be appreciated. As usual, thanks in advance!


You can't do anything with your Default.png, and just for form I'll point out that that HIG guidelines say that you shouldn't use it as a splash screen :-).

I would suggest that you use your initial view controller to duplicate the Default.png, and copy the flip animation code from a basic Utility app template - you probably want to use [NSObject performSelector:@selector(...) afterDelay:0] to get it to flip, called from your initial viewDidLoad:.


You can just present a modal view controller when you first launch using the flip transition instead of the default slide. Have your initial view controller loaded from your xib just display the same image you are using for your Default.png. Once you get the -viewDidLoad call in your initial view controller, push the modal view specifying the transition you want. Something like this:

- (void)showMainView;
{
  MainViewController *controller = [[MainViewController alloc] init];
  [controller setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
  [self presentModalViewController:controller animated:YES];
  [controller release], controller = nil;
}

As Paul suggested, you should call this using performSelector:withObject:afterDelay:

[self performSelector:@selector(showMainView) withObject:nil afterDelay:0.15];

Hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消