presentModalViewController模态的动画效果设置:
detailViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:detailViewController animated:YES];
[detailViewController release];
共有以下四种动画效果:
typedef enum {
UIModalTransitionStyleCoverVertical = 0,
UIModalTransitionStyleFlipHorizontal,
UIModalTransitionStyleCrossDissolve,
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2
UIModalTransitionStylePartialCurl,
#endif
} UIModalTransitionStyle;
//自定义 从写动画//要导入QuartzCore这个库
adressBook *adressPage=[[adressBook alloc] init];
CATransition *transition=[CATransition animation];
transition.timingFunction=UIViewAnimationCurveEaseInOut;
transition.duration=0.4;
transition.type=kCATransitionMoveIn;
transition.type=kCATransitionPush;
transition.subtype=kCATransitionFromRight;
[adressPage.view.layer addAnimation:transition forKey:nil];
[self presentViewController:adressPage animated:NO completion:^{}];