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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:19:51+00:00 2026-06-08T11:19:51+00:00

I’m attempting to create (in XCode) a Tabbed Application, which houses in one of

  • 0

I’m attempting to create (in XCode) a Tabbed Application, which houses in one of its tabs a UINavigationController, which is used to show a “FourthViewController”, and then when a button is pressed within that “FourthViewController”, a new “SlideViewController” is pushed onto the UINavigationController (phew!). I’m having problems understanding how to make the UINavigationController push a new ViewController from inside FourthViewController or SlideViewController. I’m including a flowchart and some code to try to make it more clear what I’m doing. (And for the record, it’s an app for a restaurant, which is why there are names like “shrimpquesadilla.jpg”.)

The following is a link to the flowchart, I don’t have enough reputation to embed it in the post: https://i.stack.imgur.com/tjTT1.jpg

DemoTabbedAppDelegate.h

    @interface DemoTabbedAppDelegate : UIResponder <UIApplicationDelegate,
                                     UITabBarControllerDelegate>
    {
        UINavigationController *globalUINavigationController;
    }
    ... //other syntheses
    @synthesize globalUINavigationController;

DemoTabbedAppDelegate.m

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
                    (NSDictionary *)LaunchOptions
    {
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        ... /creating the first three tab ViewControllers
        globalUINavigationController = [[UINavigationController alloc] initWithNibName:
                    @"DemoTabbedFourthViewController" bundle:nil];
        ... //setting last tab title and image
        UIViewController *viewController4 = [[DemoTabbedFourthViewController alloc]
                    initWithNibName:@"DemoTabbedFourthViewController" bundle:nil];
        [globalUINavigationController pushViewController:viewController4 animated:YES];
        ... //Starting the TabBarController and making it the rootViewController
    }

DemoTabbedFourthView.m

    //initialization and all that junk
    - (void)goToSlide:(UIImage *)image
    {
        DemoTabbedSlideViewController *d = [[DemoTabbedSlideViewController alloc]
                                            initWithImage:image];
        [globalUINavigationController pushViewController:d animated:YES];
        NSLog(@"test");
        //what goes here to call push on the UINavigationController?
    }

    - (void)clickQuesadilla:(id)sender
    {
        [self goToSlide:[UIImage imageNamed:@"shrimpquesadilla.jpg"]];
    }

DemoTabbedSlideViewController

    - (id)initWithImage:(UIImage *)image
    {
        self = [super init];
        imageView = [[UIImageView alloc] initWithImage:image]; 
        NSLog(@"test 2");
        return self;
    }

Please let me know if you need more information, I’ve tried to be as clear about this as possible. Thank you for your time.

  • 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-06-08T11:19:53+00:00Added an answer on June 8, 2026 at 11:19 am

    I think the problem might be with how you are initializing your navigation controller.
    When you instantiate your navigation controller, try using initWithRootViewController: instead of initWithNibName:.

    Also, from inside your DemoTabbedFourthView’s .m, you can get a pointer to the navigation controller it is in by accessing its navigationController property and then calling pushViewController:animated: from that:

    [self.navigationController pushViewController:d animated:YES];
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
I'm trying to select an H1 element which is the second-child in its group
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from

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.