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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:48:17+00:00 2026-05-24T19:48:17+00:00

I have an app that has a tabBar with a navbar, The tabBar is

  • 0

I have an app that has a tabBar with a navbar,

The tabBar is showing,
and working, but when I want to go to another page inside one of the tabs, it doesnt load the new page,

here my app delegate

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



self.tabBarController = [[[UITabBarController alloc] init] autorelease];


StartViewController *startViewControllerView = [[[StartViewController alloc] init] autorelease]; //ojo recomendado por apple!!!
PhotosViewController* PhotosViewController_ = [[[PhotosViewController alloc] init] autorelease];
VideosViewController* VideosViewController_ = [[[VideosViewController alloc] init] autorelease];
SocialViewController* SocialViewController_ = [[[SocialViewController alloc] init] autorelease];



NSArray* controllers = [NSArray arrayWithObjects: startViewControllerView, VideosViewController_, PhotosViewController_, SocialViewController_, nil];

    self.tabBarController.viewControllers = controllers;
self.pagesNavigation = [[[UINavigationController alloc] initWithRootViewController:startViewControllerView] autorelease];
self.pagesNavigation.navigationBarHidden = NO;

[self tabBarConfig];

[self.tabBarController setViewControllers:controllers animated:YES];


[self.window addSubview:self.pagesNavigation.view];





self.window.rootViewController = self.tabBarController;

//self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];

    [self.window makeKeyAndVisible];

return YES;



}

it shows tabs ok,

but in one of the pages I push the new view with

[self.navigationController pushViewController:bigPhotoView animated:YES];

but it doesn’t work.

So how to load the new view from my tab?

  • 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-24T19:48:19+00:00Added an answer on May 24, 2026 at 7:48 pm

    UINavigationController is a stack of view controllers. Every view controller has a property called as navigationController, which represents the UINavigationController to which it belongs. Thus, if a view controller doesn’t belong to a UINavigationController (in other words, if a view controller is not present in a stack), it’s navigationController property would be nil.

    If you want to have a view controller from which you could push new view controllers and pop view controllers, you need to create a stack (UINavigationController) first, push your view controller in this stack. Now since stack exists, we can keep pushing new view controllers in this stack.

    Your bigPhotoView is not getting pushed probably because there is no UINavigationController existing for the current view controller (from which you are trying to push bigPhotoView). This could be verified as follows:

    if (self.navigationController != nil) {
        [self.navigationController pushViewController:bigPhotoView animated:YES];
    }
    

    In the above case, you might not enter the if statement.

    I prepared your function briefly. It looks something like this.

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
        // Create Start view controller.
        StartViewController *startController = [[StartViewController alloc] init];
        UINavigationController *startViewNavigationController = [[UINavigationController alloc] initWithRootViewController:startController];
        [startController release];
    
        // Similarly create for photos, videos and social...
    
        // Create an array of view controllers.
        NSArray* controllers = [NSArray arrayWithObjects:startViewNavigationController, photosViewNavigationController, videosViewNavigationController, socialViewNavigationController, nil];
    
        // Create our tab bar controller.
        self.tabBarController = [[[UITabBarController alloc] init] autorelease];
    
        // Set the view controllers of the tab bar controller.
        self.tabBarController.viewControllers = controllers;
    
        // Release the startViewNavigationController, photosViewNavigationController, videosViewNavigationController, socialViewNavigationController...
    
        // I don't know what this does.
        [self tabBarConfig];
    
        // Add the tab bar controller to the window.
        [self.window addSubview:self.tabBarController.view];
    
        [self.window makeKeyAndVisible];
    
        return YES;
    }
    

    Here is the official apple’s documentation for UINavigationController

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

Sidebar

Related Questions

I have an app that has a tabBar Controller and a navBar Controller. It
I have an app that has a tabbar at the bottom. When I select
I have an app that has a TableView, NavigationView and TabBar running together. There
I have an app that uses a tab bar controller. It has five tabs.
Have an app that has listings - think classified ads - and each listing
I have an app that has a centre view with two views off to
I have an app that has a list of items. My customer prefers to
i have an app that has a few checkboxes in the settings and then
I have an app that has a mapview, and it shows 20 pins (from
I have an app that has some configuration settings stored in SharedPreference. Now I

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.