如何设置推送和弹出视图控制器流程

时间:2012-10-13 07:35:45

标签: iphone ios uinavigationcontroller pushviewcontroller popviewcontroller

在我的应用程序中,我想从右到左设置弹出视图控制器。当推视图控制器从左向右流动时,那很好。我尝试了这个How to change the Push and Pop animations in a navigation based app但它适用于我想要的过渡动画视图动画弹出视图控制器从右到左?请帮忙解决

1 个答案:

答案 0 :(得分:3)

用于弹出效果

ViewController *back = [[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];
NSMutableArray *vcs =  [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
[vcs insertObject:back atIndex:[vcs count]-1];
[self.navigationController setViewControllers:vcs animated:NO];
[self.navigationController popViewControllerAnimated:YES];