Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9256391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:55:44+00:00 2026-06-18T11:55:44+00:00

I am currently trying to switch the root view controller for a specific UINavigationController.

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:55:46+00:00Added an answer on June 18, 2026 at 11:55 am

    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:

    @interface MyAppDelegate : UIResponder <UIApplicationDelegate> {
        UINavigationController *myRootViewController;
    }
    
    @property (nonatomic, retain) UINavigationController *myRootViewController;
    

    then whenever you want to access it, do something like this:

    MyAppDelegate appDelegate = (MyAppDelegate *)[UIApplication sharedApplication].delegate;
    UINavigationController *rootViewController = appDelegate.myRootViewController;
    

    (where MyAppDelegate is the name of your app delegate class.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm presently trying to switch view from a UIViewController to a SplitViewController. I'm currently
I'm currently trying this: using DocumentFormat.OpenXml.Packaging; using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(fileNameDocx as string, true))
I'm currently trying to get the most popular productID from my MSSQL Database. This
I'm currently trying to switch from Coda (a Mac IDE) to Vim. One thing
I'm currently trying to implement a editable details view using a grouped UITableView. I'd
I'm currently trying to write a multiple-file Python (2.6.5) game using PyGame. The problem
Currently trying to get a Bluteooth sample working. I'm using this sample as reference
So I'm just trying to currently inflate a view in my getView function and
I'm trying to reload a viewcontroller that has already been created and retained but
I tried to implement a switch-to-fullscreen mode for an ActiveX control. This currently works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.