2 lianlianbushell lianlianbushell 于 2012.12.06 17:13 提问

iPhone中下载view视图的问题
 (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated

上面的代码实现从左侧下载视图,怎么样从右侧下载视图?

1个回答

prettYYoyic
prettYYoyic   2012.12.07 14:11
已采纳
CATransition *animation = [CATransition animation];
[[self navigationController] pushViewController:elementController animated:NO];
[animation setDuration:0.45];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromLeft];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
[[elementController.view layer] addAnimation:animation forKey:@"SwitchToView1"];

还需要添加#import <QuartzCore/QuartzCore.h>

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!