I am currently trying to switch the root view controller for a specific UINavigationController. I believe this question has been asked multiple times but nobody has seemed to given a proper answer on stackoverflow.
I am currently using this as a guide: http://starterstep.wordpress.com/2009/03/05/changing-a-uinavigationcontroller%E2%80%99s-root-view-controller/#comments
However, I cannot seem to access the UINavigationController dynamically. When I am in another .m file, it will not be able to access this navigational controller because I have initialized it in my appdelegate.m file.
Any thoughts would be greatly appreciated.
Thanks in advance,
freedom
When you initialize the UINavigationController in your app delegate, simply keep a reference to it. Create a property on your app delegate class to store the reference:
then whenever you want to access it, do something like this:
(where MyAppDelegate is the name of your app delegate class.)