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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:07:42+00:00 2026-05-31T16:07:42+00:00

I have an app with navigation controller , but my app also has a

  • 0

I have an app with navigation controller, but my app also has a simple separate view which is not a navigation controller part. And what I want to do is to add a brand new navigation controller to this view.
For my first navigation controller I used this code in my AppDelegate:

   UINavigationController *navigationController = [[UINavigationController new]   initWithRootViewController:viewController1];

    navigationController.viewControllers = [NSArray arrayWithObject:viewController1];

    self.window.rootViewController = navigationController;

But which code I should use, if I want to create a new Navigation Controller ?

Thanks !

UPDATE:

So, I made some pictures:

One the first pic there is a navigation controller (which is declared in AppDelegate). And It contains an info button. Then, when we press the button we move to another view (pic 2). And its just a navigation bar in this view, not an navigation controller. I wanna add a navigation controller, not a navigation bar in this view, so users will be able to use UITableView easily

enter image description here

enter image description here

  • 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-31T16:07:43+00:00Added an answer on May 31, 2026 at 4:07 pm

    We would need to know a little more about your intended view hierarchy, and application flow. But in the code you’re posting, I’m not sure what is going on. Why not just:

    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController1];
    self.window.rootViewController = navController;
    

    That said, you would create other UINavigationControllers exactly the same way.

    Update:

    When you press the info button on the first view, you could present the navigation controller modally I think.

    - (IBAction)infoButtonAction:(id)sender;
    {
        //  InfoTableViewController is the controller with Instructions, Contact, and something else
        //  my Russian isn't so good.
        InfoTableViewController *tableController = [[InfoTableViewController alloc] initWithStyle:UITableViewStyleGrouped];
        UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:tableController];
        navController.modalPresentationStyle = UIModalPresentationFormSheet;    //  or whatever
        [self presentModalViewController:navController animated:YES];
    }
    

    Note that I’m not dealing with memory management because I don’t know if this is ARC or not. Is that how it should behave?

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

Sidebar

Related Questions

I have an app, which has a top navigation bar and a bottom tab
I have a navigation controller, which has the following structure: Category Item Item Detail
I have a simple iPhone app based on a navigation controller. There are two
I have an app with a navigation controller as the root view. There are
I have an iPhone app that is based on a navigation controller. I have
i have just converted an app i was making from a navigation controller app
I have a tab-bar and navigation controller application (like Youtube app or Contacts app).
I have a navigation-based app and say my root controller A causes a viewController
I have an App with a Navigation Controller, several sub Controllers. With XCode Debug
I have a view based app that works well. (In other words, I'm not

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.