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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:31:13+00:00 2026-05-23T12:31:13+00:00

Description I have a Tab Bar Controller with a navigation controller tab. The first

  • 0

Description

I have a Tab Bar Controller with a navigation controller tab. The first and default tab is called “NowViewController”. So in my AppDelegate’s application:didFinishLaunchingWithOptions I have the following:

// Set up MainWindow
NowViewController *nowViewController = [[[NowViewController alloc] initWithNibName:@"NowViewController" bundle:nil] autorelease];
nowViewController.context = [self managedObjectContext];
self.tabBarController.selectedViewController = nowViewController;
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];

I need to pass the Core Data’s managed object context which is why I instantiate a NowViewController object.

Now in my MainWindow.xib, I simply have the Navigation Controller set as follows:

image 1

Problem

When launching the app, I get an empty page with the NewsViewController. When I click on the “Now” tab, I will then get a Navigation Bar that says “Root View Controller” when in fact it should say “Now”. I already have self.title = @"Now" in the NowViewController’s ViewDidLoad method.

Any ideas why I am getting this kind of problem?

Thank you!

  • 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-23T12:31:14+00:00Added an answer on May 23, 2026 at 12:31 pm

    FIXED

    I just changed my AppDelegate’s line of code posted above to:

    NowViewController *nowViewController = (NowViewController *) [self.navigationController topViewController];
    nowViewController.context = [self managedObjectContext];
    self.window.rootViewController = self.tabBarController;
    [self.window makeKeyWindow];
    

    I would really appreciate though if someone would explain exactly this line of code:

    NowViewController *nowViewController = (NowViewController *) [self.navigationController topViewController]

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

Sidebar

Related Questions

I have a class with following description: public class Customer { public ISet<Client> Contacts
I have a select query that currently produces the following results: Description Code Price
I have seen the following code: [DefaultValue(100)] [Description(Some descriptive field here)] public int MyProperty{...}
I want to make a favorites button in my tab bar controller which permanently
I have the following code header(Content-Description: File Transfer); header('Content-Type: audio/mp3'); header(Content-Disposition: attachment; filename= .
I have a description field indexed in Lucene.This field contains a book's description. How
If I have a table field named 'description', what would be the SQL (using
I have a query where i want to get a distinct description by the
I have a list of objects, each containing an Id, Code and Description. I
After I messed up the description of my previous post on this I have

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.