Reputation: 13838
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:
What am I doing wrong here?
Upvotes: 3
Views: 638
Reputation: 420
Overwrite the constructor for your Dialog viewcontroller to set the pushing parameter to true.
Stock Monotouch dialog:
public partial class DetailedZenoView : DialogViewController {
public DetailedZenoView () : base (null, true) {
}
...
MvvmCross (CrossUI) dialog:
public partial class DetailedZenoView : MvxDialogViewController {
public DetailedZenoView () : base ((UITableViewStyle)1, null, true) {
}
...
Upvotes: 12