系统自带(四种效果):
presentModalViewController模态的动画效果设置:
- UIViewController *detailViewController = [[UIViewController alloc] init];
- 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;
自定义:
- <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>
相关推荐
presentModalViewController实现的启动动画
如题 源码是xcode4.5 ios6.0 环境写成的 做为基础扫盲 可以学到presentModalViewController 的使用 页面跳转的效果等
使用presentModalViewController将栈中有ViewController的NavigationController弹出,
iOS 相机的调用,相册使用方法 UIImagePickerControllerSourceType sourceType = ... [self presentModalViewController:picker animated:YES];//进入照相界面 [picker release];
[[UIApplication sharedApplication].keyWindow.rootViewController presentModalViewController:self animated:NO]; 可以 获取 系统的 rootviewcontroller 但 cocos2d-x 2.1.1 在 appcontroller.mm 内定义的 ...
detect为自己定义的方法,编辑选取照片后要实现的效果 取消选择: -(void)imagePickerControllerDIdCancel:(UIImagePickerController*)picker { [picker dismissModalViewControllerAnimated:YES]; } 17.跳到下个...
RKCropImageController 这是一种模态风格的裁剪图像控制器,支持缩放以更准确地选择边框。 如何使用 ... [ self presentModalViewController: cropController animated: YES ]; // delegate callb