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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:57:55+00:00 2026-05-25T21:57:55+00:00

Preface: I am not using *.xib files. I instantiate a UINavigationController in a class

  • 0

Preface: I am not using *.xib files.

I instantiate a UINavigationController in a class that effectively serves as my ‘rootViewController’. This ‘rootViewController’ also has two UITableViewController members that are drawn on different sections of the iPad screen. One of which is set as the root view for the navigation controller. Let’s call it tableViewControllerA.

The problem is, when I invoke pushViewController on a valid UINavigationController, I see no effect:
[tableViewControllerA.navigationController pushViewController:tableViewControllerX animated:YES];

I’ve gathered from the posts I’ve searched today, that this push method should in turn cause the screen to redraw the top of stack controller.view. This is not what I’m seeing.

It seemed there was a disconnect in my implementation, and it was time to reference a working example in my environment (xcode 4.0). Assuming the canned templates would provide a working basis, I created a new navigation-based applications. I simply modified didFinishLaunchingWithOptions: as follows.

    UIViewController *view1 = [[UIViewController alloc] init];
    UIViewController *view2 = [[UIViewController alloc] init];

    view1.title = @"view1";
    view2.title = @"view2";

    [self.navigationController pushViewController:view1 animated:YES];
    [self.navigationController pushViewController:view2 animated:YES];

    self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:view1];

    [view1 release];
    [view2 release];

I found similar results. When I launch the simulator the screen title reads the title of whatever the self.window.rootViewController is pointing at. With the code as is, the title of the resulting top screen reads “view1”. When I initWithRootViewController:view2, the resulting top screen reads “view2”.

So please tell me I’m stupid cuz xyz…
Thanks.

  • 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-25T21:57:55+00:00Added an answer on May 25, 2026 at 9:57 pm

    Here are some references and suggestions:

    Simple tutorial for navigation based application:

    http://humblecoder.blogspot.com/2009/04/iphone-tutorial-navigation-controller.html

    Here is another one to create the step by step navigation controller and adding the views:

    http://www.icodeblog.com/2008/08/03/iphone-programming-tutorial-transitioning-between-views/

    and here a bit advance with navigation + tab bar controller:
    http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/CombiningToolbarandNavigationControllers/CombiningToolbarandNavigationControllers.html

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

Sidebar

Related Questions

So let me preface this by saying that I'm not an SQL wizard by
Let me preface this question by stating that I'm not a C# developer. I'm
Preface: This is not much about how to structure code within files. I have
We are using WSS 3 SP2. I'd like to preface this by saying that
Preface : I'm honestly not sure if this should be on StackOverflow, SuperUser or
I will preface this question by saying, I do not think it is solvable.
Let me preface this with the disclaimer that I am very new to multithreading
Let me preface this by saying this is not an actual situation of mine
Let me preface the question by stating that I'm not a programmer and am
Ok guys, let me preface my question with this, This is not a technical

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.