DialogViewController aborts the UINavigationController path

I ran into a problem when I clicked DialogViewController on my global UINavigationController apps so that it loses back buttons.

I was able to weld this with 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 DialogViewController ? I, although they could work as a replacement for replacing the UIViewController .

+8
c # ios uinavigationcontroller monotouch.dialog
source share
1 answer

Just use:

 nav.PushViewController(new DialogViewController(new RootElement("#2"), true), true); 

i.e. extra true for the DialogViewControler constructor.

+12
source share

All Articles