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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:30:46+00:00 2026-05-16T20:30:46+00:00

I have a navigation based iPhone app. Normally you start on the RootViewController, there

  • 0

I have a navigation based iPhone app.
Normally you start on the RootViewController, there you can select a row from an UITableView which brings you to another ViewController, let’s call it SecondLevelViewController.

When the app is started I check if it was quit from SecondLevelViewController (via a parameter saved to the defaultUserSettings). If it was, I want to display that SecondLevelViewController again.

To achieve this I do the check in my application delegates

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

method, right after

[window addSubview:[navigationController view]];
[window makeKeyAndVisible];

Then I add the SecondLevelViewController to the view stack. I tried it with pushViewController and with setViewControllers:

        SecondLevelViewController *newVC = [[SecondLevelViewController alloc] initWithNibName:@"SecondLevelView" bundle:nil];            
        [self.navigationController setViewControllers:[NSArray arrayWithObjects:[self.navigationController.viewControllers objectAtIndex:0], newVC, nil]
                                             animated:YES];

The app then shows the desired view.
Now the problem: the SecondLevelViewController displays a back button on the left side of the navigation bar. This button doesn’t appear when using the way described above.
My conclusion is, that the RootViewController isn’t yet fully initialized at the time I go the the SecondLevelViewController. Is this possible? How can I avoid this?

Thanks,
Mark.

  • 1 1 Answer
  • 3 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-16T20:30:46+00:00Added an answer on May 16, 2026 at 8:30 pm

    Yes …….It’s suppose to be true…..
    You can do the thing…like this..

    Just check the condition as per your setting and it’s directly coming from RootViewController then put a Custom Back Button/Bar Button in navigation bar…..of SecondLevelViewController.

    Before this You need to check the condition… if it’s true use use custom button

    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(Back:)];

    • (void) Back: (id) sender{

      [self.navigationController popToRootViewControllerAnimated:YES];
      }

    I think so it would definitely work for u.

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

Sidebar

Related Questions

I have a simple iPhone app based on a navigation controller. There are two
I'm writing a Navigation-Based iPhone app, and I'd like to have a UIToolBar docked
I have an iPhone app that is based on a navigation controller. I have
I have a navigation based iPhone app. When you press on a cell in
I have a primarly code based iphone sample app that works. It is Navigation
I have a navigation based iPhone app, and I want to load a view
I have a navigation-based app and say my root controller A causes a viewController
I have UITableViewController (initiated by the Navigation-based app project template). I am overriding loadView
I'm working on a largely navigation-based iPhone app that communicates with a REST API
I'm working on a navigation-based iPhone-only app that serves two main purposes: One, to

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.