Possible Duplicate:
How to change the Push and Pop animations in a navigation based app
使用MonoTouch和MonoTouch.Dialog,我将DialogViewController
推送到 UINavigationController
上,当这样做时,它将使当前显示的屏幕从右向左移动。我想知道如何扭转这种状况,使当前屏幕从左到右“弹出”,就像按下后退按钮一样。
我的代码如下,其中_root是RootElement。
_viewController = new DialogViewController(_root, false);
_navController.PushViewController(_viewController, true);
最佳答案
您可以通过搜索堆栈溢出来找到答案。例如这里:
How to change the Push and Pop animations in a navigation based app
MainView *nextView = [[MainView alloc] init];
[UIView animateWithDuration:0.75
animations:^{
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[super pushViewController:nextView animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
}];
UIView.Animate(0.75f, 0f, UIViewAnimationOptions.CurveEaseIn, delegate {
navController.PushViewController(...);
UIView.SetAnimationTransition(UIViewAnimationTransition.FlipFromRight, navController.View, false);
}, null);