具有三个视图A,B,C,其导航顺序如下:

A => B => C


在将所有三个视图都添加到历史记录堆栈的情况下,按以下顺序进行向后导航:

C => B => A


有没有一种方法可以从View C导航回到View A并跳过View B?

C => A


我在Xamarin.ios中使用MvvmCross。

谢谢!

最佳答案

正如suart所说; Gshackles在MvvmCross中有一些很棒的关于主持人的博客文章。其中之一是:http://www.gregshackles.com/presenters-in-mvvmcross-manipulating-the-back-stack/

您可以使用的代码行是:

MasterNavigationController.PopToViewController(existingViewController, true);


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

MasterNavigationController.PopToRootViewController(false);

关于ios - 阻止View进入历史记录堆栈,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28995876/

10-13 01:26