iphoneobjective-ciosuinavigationcontrolleruitabbar

iPhone, UINavigationController and UITabBar how to present a modal dialog regardless of the selected tab?


I have a UINavigationController and a UITabBar within the application. Each ViewController within the tabbar has its own UINavigationController.

I would like to be able to present a modal dialog to the user (an alert/reminder/legal/join mailing list) kind of action regardless of the currently selected tab.

Right now I have one of my UIViewControllers handle the act of presenting the dialog, but the user would not see it, unless the tab has been selected.

How would I go about solving such a problem? Storyboards come to mind, but my project is far too deep to rewrite it for storyboards in its current state.

Thank you!


Solution

  • You could present it on the UITabBarController.

    [tabBarController presentModalViewController:animated:];