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 6217573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:27:02+00:00 2026-05-24T07:27:02+00:00

I have a weird design pattern for one of my aps where I have

  • 0

I have a weird design pattern for one of my aps where I have a tool bar that acts as a tab bar. Basically I add this toolbar to all of my view controllers, and the tool bar itself contains pointers to the 3 different nav controllers in my app. When one of the toolbar buttons is pushed, it should be able to remove the nav controller that currently is on the window, and add the one the user has selected. My problem is I’m not sure how to add the new navcontroller to the superview. Would I instantiate an app delegate object and add it to that? Or would I need to send a pointer from my app delegate to the tool bar as a class variable? Any help would be appreciated.

  • 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-05-24T07:27:02+00:00Added an answer on May 24, 2026 at 7:27 am

    It seems to me that the best way to go about this would be to manage your UINavigationController switching in your app delegate. You can look after all the cleanup that you need to do during this process here, as well. If there are a finite number of UINavigationControllers that get switched out, I might just have a few methods to take care of this:

    App delegate .h file:

    @property (nonatomic, retain) UINavigationController *currentNavController;
    

    App delegate .m file:

        @synthesize currentNavController = _currentNavController;
    
        - (void)loadNavControllerOne
        {
            self.currentNavController = ...; // Set up your new controller
            self.window.rootViewController = self.currentNavController;
        }
    
        - (void)loadNavControllerTwo
        {
            // Similar to -(void)loadNavControllerOne
        }
    

    Abridged, but you get the idea. This will change if you need to share state between these controllers, though. Do you?

    EDIT: In order to access the app delegate, call [[UIApplication sharedApplication] delegate].

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

Sidebar

Related Questions

I have a weird database design issue that I'm not sure if I'm doing
I have a weird problem. I create this window, but its blank until i
I have a weird issue that I am being asked to fix but alas
I have a weird scenario but this was how it was designed before me.
I have a design that I have set up and I could really use
I have a weird problem with doctype, the weird thing is that the website
This is really weird and can't seem to understand it. I have a header
I have a Story that can have one nominator assigned to it. A nominator
I have a weird design question. I have a model called Article, which has
I have CheckedListbox bound to List. However I notice, the weird behavior of this

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.