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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:53:30+00:00 2026-05-14T05:53:30+00:00

Here is the thing. I currently have a tabBar controller, with several navigation controllers

  • 0

Here is the thing. I currently have a tabBar controller, with several navigation controllers in it. Just like this :

http://tof.canardpc.com/view/d27d1361-c81b-43a0-9b5b-abb13d78e422.jpg

In my first navigation controller, i have a view controller called NewsViewsController. Here is its nib (see picture).

My goal is to show/hide the subviews (with tableview inside) according to the position of the segmented control. This way, I can have two separates viewControllers for each tableview. This is actually working. And here is the result (see picture).

My problem is the following one. When i try to click on a cell, the pushview doesn’t work. Indeed my self.navigationController is null. How can i push my detail view using the parent navigation controller ?

Is the architecture of my application wrong ? 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-14T05:53:31+00:00Added an answer on May 14, 2026 at 5:53 am

    The navigation controller is setup to push and pop the view controller that manages the entire view. Really nothing in the API easily supports multiple view controllers whose views display within the same superview.

    Instead of trying to push the next view on one of the tableview subviews, you should manage the nav from the “News View” controller. Even better, you should have just the “News View” controller and have separate classes that implement each table’s delegate and datasources (they don’t have to be in the view controller its just usually convenient.)

    Something like this:

    @interface NewsViewController {
        CustomClass1 *newsTableDelegateAndDataSource;
        CustomClass2 *categoryTableDelegateAndDataSource;
    }
    
    @interface CustomClass1 {
        UINavigationController *nav;
    }
    

    in NewsViewController.m

    - (void) viewWillAppear{
        self.newsTableDelegateAndDataSource.nav= // reference to the navigation controller;
        self.categoryTableDelegateAndDataSource.nav = // reference to the navigation controller;
    }
    

    Then in the didSelectRow methods of one of CustomClasses:

    nextViewController=// intialize or get reference to next view controller
    [self.nav pushViewController:nextViewController animated:YES];
    

    The nav will push the nextViewController on top of NewsViewController and display the new screen. When it is done, it pops itself and NewsViewController reappears in the state you left it in.

    This way you only have one view controller active at anyone time so the API works smoothly but you encapsulate the behavior of each table in its own class.

    Everybody is happy.

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

Sidebar

Related Questions

Here is the thing. Right now I have this e-commerce web site where people
I've almost completed my project but just have this last thing which I've been
Here's the thing. Recently I've tried to add FB like button to some website
Here's the thing: In my Qt4.6-Project, I use a SQLite-Database. This database shouldn't be
Here's the thing. I have an interface, and I would to put the Include
I currently have two interfaces(that I'll name here IA and IB ): interface IA
Currently have this code defining getter/setter for an object's selectedID property. The object is
Currently I have a Winforms app which relies on transpareny effects. However this is
i'm currently have a problem by using the SetTimeOut function. The thing is that
Currently I have a class, TransactionData , which is just a little bit more

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.