阻止View进入历史堆栈

时间:2015-03-11 19:40:29

标签: ios xamarin mvvmcross

有三个视图A,B,C,按以下顺序导航:

A => B => C

将所有三个视图添加到历史堆栈中,后退导航按以下顺序排列:

C => B => A

有没有办法从View C导航回View A并跳过View B?

C => A

我正在使用MvvmCross和Xamarin.ios。

谢谢!

1 个答案:

答案 0 :(得分:1)

如suart所说; Gshackles有很多关于MvvmCross演讲者的博文。其中之一是:http://www.gregshackles.com/presenters-in-mvvmcross-manipulating-the-back-stack/

您可以使用的代码行是:

MasterNavigationController.PopToViewController(existingViewController, true);

或者,如果您只想回到第一个(又名根):http://gregshackles.com/presenters-in-mvvmcross-using-presentation-values/

MasterNavigationController.PopToRootViewController(false);