我确定我在这里做一些蠢事,但我看不到它。当我将DialogViewController推到导航堆栈上时,我的后退按钮就会消失。
我的推送代码是:
//launch an inspection VC
var vc = new FacilityInspectionListViewController ();
this.NavigationController.PushViewController (vc, true);
我的对话框代码如下:
public FacilityInspectionListViewController () : base(UITableViewStyle.Plain, null)
{
var root = new RootElement ("Root")
{
new Section ()
{
new StringElement ("Facility 1", () => {DoSomething();}),
new StringElement ("Facility 2", () => {DoSomething()}),
new StringElement ("Facility 3", () => {DoSomething();})
}
};
base.Root = root;
}
但是当我这样做时,推动的屏幕没有后退按钮:
我在这里做错了什么?
答案 0 :(得分:12)
覆盖Dialog视图控制器的构造函数,将推送参数设置为true。
Stock Monotouch对话框:
public partial class DetailedZenoView : DialogViewController {
public DetailedZenoView () : base (null, true) {
}
...
MvvmCross(CrossUI)对话框:
public partial class DetailedZenoView : MvxDialogViewController {
public DetailedZenoView () : base ((UITableViewStyle)1, null, true) {
}
...