我有一个有很多屏幕的应用程序,比如说HomePage,Section Screen和Detail Page,Category Screen。如何在Xamarin.iOS中使用SideBarController时导航到新屏幕
我使用NavigationController从主页导航到截面屏幕。
在SectionScreen中,我使用了SideBarController组件(https://components.xamarin.com/view/sidebarnavigation)来实现导航抽屉或弹出菜单。
问题是如何从Section Screen
导航到Detail Page
或导航到Category Screen
。我需要从MenuController
或ContentController
进行此类导航。我不想只改变contentView
。我想推另一个UIViewController
。
我已经使用了常用的一个:
this.NavigationController.PushViewController(new UIViewControllerExample(), true);
,但也存在一些问题:
- 在明细页面无法访问
NavigationBar
当我按下
back
,该应用程序崩溃的错误:不能将自己添加到子视图
这就是问题所在。第一个图像显示当我使用上面的代码发生什么,
不知道如何解决这个问题。
嗯,我知道这一点,但正如我上面说我不想改变内容查看,我需要导航在新的屏幕上。 – Xhulio