- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
此函数从右侧加载 View 。如何从左侧加载 View ?
最佳答案
这里是
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>
关于iphone - 如何从左侧加载 View ?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13737969/