Ran in to an issue where I was pushing several DialogViewControllers in to a NavigationController. The DialogViewcontroller instances would asynchronously fetch data, and add the dialog elements when the data was retreived. Whilst this was working quite well, at any given point in the navigation the back button would only appear on the topmost view (the current view). Navigate back to any previous view and the back button would not be on the NavigationController.
I knew that the NavigationController is reliant upon the title of each UIView, so I made sure I was setting that, but it didn’t help.
The solution was to make sure to not reinstantiate the Root element of the DialogViewController. Doing so must mess with the Title of the UIView, and even if ithe title content stays the same, it looks like it causes the NavigationController to forget what it’s called and prevent a back button from showing. Instead, instantiate the RootElement when the class is created, and add items to the that object when the data has been retreived.
Bad:
//data has been retreived, replace dialog contents
this.Root = new RootElement(myTitle)
{
new Section("Folders"){
Elements = myData.Select(obj => (Element)new StringElement(obj.Name)).ToList()
}
};
Good:
//data has been retreived, replace dialog contents
this.Root.Clear();
this.Root.Add(new Section[]
{
new Section("Folders"){
Elements = myData.Select(obj => (Element)new StringElement(obj.Name)).ToList()
}
});

Hello,
I have a standard navigation controller like:
navigationController = new UINavigationController(memberSelectController);
and I would like to a Monotouch.Dialog to it.
That works:
MemberDialogController controller = new MemberDialogController(SelectedMember);
controller.Title=”Member Info”;
NavigationController.PushViewController(controller,true);
However the dialog is show, but there is no back button. Is it possible to add a monotouch dialogue from a ‘standard’ UINavigationController’
thanks for your help
Make sure you set a Title on the initial controller’s View (memberSelectController in your example).
memberSelectController.Title=”Leden Lijst”;
MemberDialogController controller = new MemberDialogController(SelectedMember);
controller.Title=”Info”;
NavigationController.PushViewController(controller,true);
but no succes
Thank you. You just saved me so much time.
After 3 hours of unsuccessful hacking I stumbled upon your blog…
Thank you for saving my day!