【发布时间】:2016-05-13 16:00:37
【问题描述】:
我有一个包含很多屏幕的应用程序,比如说主页、部分屏幕和详细信息页面、类别屏幕。
我使用 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时,应用程序崩溃并出现错误:无法将自身添加到子视图
这就是问题所在。第一张图片显示了当我使用上面的代码时会发生什么,
知道如何解决这个问题。
【问题讨论】:
标签: uinavigationcontroller xamarin.ios sidebar