Yeah. Add it to the current view of the controller controller (or as a subspecies of the window) and animate it on the screen, as Valerie said.
To remove it using animation, do this (I assume the modal view is 320 x 460 and it will move down from the screen):
- (void)dismissModal { // animate off-screen [UIView beginAnimations:nil context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; [UIView setAnimationDuration:0.50]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; self.view.frame = CGRectMake( 0, 480, 320, 460 ); [UIView commitAnimations]; } - (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { // don't remove until animation is complete. otherwise, the view will simply disappear [self.view removeFromSuperview]; }
Jens Willy Johannsen
source share