I encountered a problem when pushing a DialogViewController
to my apps global UINavigationController
, that it would lose the back buttons.
I was able to boil it down to this simple example:
var nav = new UINavigationController();
window.RootViewController = nav;
nav.PushViewController(new UIViewController() { Title = "#1"}, true);
nav.PushViewController(new DialogViewController(new RootElement("#2")), true);
nav.PushViewController(new UIViewController() { Title = "#3"}, true);
You can get from #3
to #2
, but not from #2
to #1
.
Am I doing something wrong with the DialogViewController
? I though they could work as a drop-in replacement for UIViewController
.
Simply use:
nav.PushViewController(new DialogViewController(new RootElement("#2"), true), true);
i.e. extra true
for the DialogViewControler
constructor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With