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

  • Home
  • SEARCH
  • 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 9189003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:08:50+00:00 2026-06-17T20:08:50+00:00

In Objective-C, what is the best way of getting a reference to the current

  • 0

In Objective-C, what is the best way of getting a reference to the current UINavigationController? I would like to gain access to it from any class that may not have a reference to a UIController, delegate, or anything else.

Is there an existing way to get the current UINavigationController? Should I add something to my application delegate, and retrieve that?

  • 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-17T20:08:51+00:00Added an answer on June 17, 2026 at 8:08 pm

    As it turns out, you can get it, albeit with quite a bit of dot syntax, from any UIView/UIViewController descendant.

    self.(view).window.rootViewController.navigationController;
    

    If you are using an object that descends from any other class, the same is true, except you must go through UIApplication

    [UIApplication sharedApplication].keyWindow.rootViewController.navigationController;
    

    Of course, both of these break MVC in a big way, and it is definitely recommended that any logic that must touch the “default navigation controller” be added to the root view controller.

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

Sidebar

Related Questions

Whats the best way to get the current time (HH:MM:SS) using Objective-C. I would
I'm starting objective-c development and I would like to ask the best way to
I would like to write some Objective-C code for distribution. What is the best
When reading Best way to define private methods for a class in Objective-C I
The best way to remove duplicate values ( NSString ) from NSMutableArray in Objective-C?
Possible Duplicate: Best way to define private methods for a class in Objective-C Hi,
Which is best way for inter process(from different users) communication in objective c? Can
I'm currently learning objective-c. I have heard (and experienced) that the best way to
I am looking for the best way to call Python code from Objective-C program.
Using the Java driver, what's the best way to convert an ObjectID to/from a

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.