3

I'm sure I'm doing something dumb here, but I can't see it. When I push a DialogViewController onto the navigation stack, my Back button disappears.

My push code is this:

//launch an inspection VC
var vc = new FacilityInspectionListViewController ();
this.NavigationController.PushViewController (vc, true);

and my dialog code is this:

    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;
    }

But when I do this, the pushed screen has no Back button:

Screenshot

What am I doing wrong here?

4

1 回答 1

12

覆盖 Dialog viewcontroller 的构造函数以将push参数设置为 true。

  1. 库存 Monotouch 对话框:

    public partial class DetailedZenoView : DialogViewController {
        public DetailedZenoView () : base (null, true) {
        }
    ...
    
  2. MvvmCross (CrossUI) 对话框:

    public partial class DetailedZenoView : MvxDialogViewController {
        public DetailedZenoView () : base ((UITableViewStyle)1, null, true) {
        }
    ...
    
于 2013-06-28T18:30:24.897 回答