I'm displaying a splashview on start of my application and after 2 seconds i move it out to the right. Th开发者_如何学Cis works fine :)
But now I(or better somebody else) want a curlup animation to hide the splashview. And I don't get it to work :(
I added a containerView with two imageViews. One with the splashImage and one with an transparent image. And now I want to switch them...
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.containerView cache:YES];
[self.splashView removeFromSuperview];
[self.containerView addSubview:self.splashViewTrans];
[UIView commitAnimations];
With this code it shows nothing. No transition and no splashImage...
Does anyone solve this and can give me a tip?
Thanks, Stefan
Try commitAnimations
before removing the splashView
—the splashView
is disappearing before the animation occurs. setAnimationTransition:forView:cache:
only creates an animation; to display it you have to commit
it.
精彩评论