系統自帶(四種效果): presentModalViewController模態的動畫效果設置: [cpp] UIViewController *detailViewController = [[UIViewController alloc] init]; detailViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl; // 設置動畫效果 [self presentModalViewController:detailViewController animated:YES]; [detailViewController release]; 共有以下四種動畫效果: [cpp] typedef enum { UIModalTransitionStyleCoverVertical = 0, UIModalTransitionStyleFlipHorizontal, UIModalTransitionStyleCrossDissolve, #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2 UIModalTransitionStylePartialCurl, #endif } UIModalTransitionStyle; 自定義: [cpp] www.2cto.com <span style="color:#330033;">CATransition *animation = [CATransition animation]; [animation setDuration:0.5]; [animation setType:kCATransitionPush]; [animation setSubtype:kCATransitionFromRight]; [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; [[myViewController.view layer] addAnimation:animation forKey:@"SwitchToView"]; [self presentModalViewController:myViewController animated:NO];</span>