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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:20:31+00:00 2026-05-28T02:20:31+00:00

There must be a simple solution to this, but after 4 hours of browsing

  • 0

There must be a simple solution to this, but after 4 hours of browsing StackExchange, I’m giving up and trying to get this answered here:

Situation:
iOS 5, Xcode 4.2.1, using Storyboards

Setup:

  • Root Navigation Controller = UITabBarController with 5 items
  • Each tab links to a UITableViewController (via segues), which works perfectly, automatically
  • I have classes for each view controller and the navigation controller (UITabBarController)
  • I click on a tab, say “Program”, and it shows me a list of items (in the linked UITableViewController), say one of these items is “Sessions”
  • I click on “Sessions”, didSelectRowAtIndexPath gets called just fine.
  • I want to perform a segue now (which I have connected from that UITableViewController, not the cell, to the new UITableViewController and given it an identifier.
  • I call:
    [self performSegueWithIdentifier:@"programToSessions" sender:self];

  • prepareForSegue gets called, but nothing afterwards. No error, no warning. The new UITableViewController doesn’t show up.

  • Note: It DOES show up, however, if I switch the segue to a “modal” – but it discards/hides the original tab bar at the bottom then (not intended…)

So far, my problem seemed to have a likely solution. The navigation controller. I figured, if I setup a navigation controller reference in the AppDelegate, initiated/set it once the actual root navigation controller is loaded (in viewDidLoad), i.e. basically used something along the lines of: app.navController = self.navigationController in the viewDidLoad – this could work! Right? So, I changed the segue action to:
[app.navController performSegueWithIdentifier:@"programToSessions" sender:self];

Yet, nothing changes, it does not show up.

Any ideas?

Solved:

There were a few issues here. Major issue was the fact that I missed putting a “Navigation Controller” between the UITabBarController and the UITableViewController. This can be done by adding a new “Navigation Controller” to the storyboard, then drag from UITabBarController (the rootViewController) to this new controller and set a RELATIONSHIP. Next, drag a RELATIONSHIP to the UITableViewController. So, as outlined by the correct answer it should look like:
UITabBarController –> (relationship) –> UINavigationController –> (relationship) –> UITableViewController

In order to load new UITableViewControllers on top of the last UITableViewController, a simple segue and calling it through code will suffice. The final tree will look like:

UITabBarController –> (relationship) –> UINavigationController –> (relationship) –> UITableViewController –> (segue) –> UITableViewController

Give the segue an identifier. In code, use this:

     - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
        [self performSegueWithIdentifier:@"loadMyDetailView" sender:self];
    }
  • 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-28T02:20:31+00:00Added an answer on May 28, 2026 at 2:20 am

    You have to use prepareForSegue:sender: to fire the equivalent of didSelectRowAtIndexPath:. (Empty out the latter.) Instead of pushing the new view controller on the navigation stack, the segue already has a property destinationViewController that will just work automatically. You can modify this property if you want to customize the new view controller. Make sure segue.identifier is correct!

    Also, from your question I notice some confusion about the controllers of view controllers. You mention two of these: the tab bar controller and a navigation controller. In storyboard, the setup should be like this:

    TabBarController --(relationship)--> NavigationController 
    --(relationship)--> ViewController 
    --(segue)--> next ViewController
    

    Make sure all these are correct in storyboard and see if it works.

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

Sidebar

Related Questions

It feels like there must be some semi-simple solution to this, but I just
First of all, I'm sure there must be a simple solution to this but
There must be a simple solution out there, I'm trying to use NHibernate Validator
In my heart, I feel that there must be a super simple recursive solution
I'm sure this is a relatively simple question, and there must be a good
There must be an easy way to do this, but somehow I can wrap
I am sure there must be a relatively straightforward way to do this, but
There must be an easy way to do this. I build a Flex app
I think there must be something subtle going on here that I don't know
There must be a generic way to transform some hierachical XML such as: <element1

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.