I’m currently displaying a UIViewController like this:
[[self navigationController] presentModalViewController:modalViewController animated:YES];
and hiding it like this:
[self.navigationController dismissModalViewControllerAnimated:YES];
The animation is ‘slide up from the bottom’… then slide back down. How can I change the animation style? Can I made it fade in/out?
Cheers!
Marcus Zarra posted a great solution to this on the SDK mailing list:
There are transitions for flipping and page-curling. If you are set on fading, can try adjusting your new view’s alpha:
However, what you probably want is a crossfade, or at least a fade-over. When the UINavigationController switches to a new view, it removes the old one. For this effect, you’re probably better off just adding a new view to your existing UIViewController and fading its alpha in over time.
Note: If you are not in your app delegate [self window] will not work. Use self.view.window , thanks to user412500’s post for pointing this out.