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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:01:04+00:00 2026-05-18T07:01:04+00:00

Hi I use Navigation controllers a lot in my app but my apps starting

  • 0

Hi
I use Navigation controllers a lot in my app but my apps starting to suffer from views calling the same views over and over and pushing them on the nav controller stack rather than reusing existing views on the stack.

For instance I have a map view thats called in various places in my app.

I should really go through the Nav Controller stack and find the mapview I pushed already and move it to the top of the stack.

Instead I create a new one and just push it on the top.

As my app gets more complicated Im sure ill get memory issues and users will get bored hitting the back button to get to the main menu.

Anyone got good example of finding a view in the Nav Controller stack.

How should I do it?

Do I need to keep a pointer to my Map View in App Delegate?

If there a way to find a view quickly in the stack or do I need to keep an index/NSDictionary to their location somewhere.

I noticed that whoever is writing the Facebook app now has the same problem. As notifications come in they open the app and instantiate the Notification view and push it on the stack. After a while you end up closing a whole pile of old notification windows to get back to main menu.
cheers

  • 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-18T07:01:04+00:00Added an answer on May 18, 2026 at 7:01 am

    If you want the particular viewcontroller on the top of stack, which you have already pushed on the stack, instead of creating one, you can use the following method.

    - (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated
    

    If you know in advance the viewControllers will be pushed on the stack, you can push them at once with the below function, instead of pushing them again and again.

    - (void)setViewControllers:(NSArray *)viewControllers animated:(BOOL)animated
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use Table Views and navigation controllers. This is the code
We are working on a website which is small but it use Flash Navigation,
I usually avoid Apple navigation patterns, especially stacking views. I tend to use one
I've created a simple navigation application, which alternates between two views through the use
I had a Navigation Controller based application and decided to use tab bars. And
I am trying to use some action when I click button in navigation controller.
I use the jQuery-ui tabs widget as a navigation. Contents of all tabs are
First off I use this code to make the navigation bar always stay fixed;
I made an totally custom navigation bar and would like to use the exact
how to use google-maps on API2 to get navigation to specified place i've add

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.