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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:52:28+00:00 2026-06-17T23:52:28+00:00

I have a pretty simple question. Say you have 2 view controllers A and

  • 0

I have a pretty simple question. Say you have 2 view controllers A and B. A is a UITableView with STATIC CELLS. That is A is built using storyboard objects only as opposed to programmatically. B is also a UITableView but built programmatically with DYNAMIC CELLS. So I wired up Segues (with identifiers set in the storyboard) from each cells in A to the B Tableview.

Now what I would like to have is to know which segue has been pushed when a row in A is selected. I know this can easily be done if I create the cells in view A programmatically and use the prepare/perform segue methods. But since the contents in A will never change, I do not want to go that route. Reason why I am trying to find out how to check which segue has been pushed when I select a given row in A. Ideally there would be some for of a method DIDPERFORMSEGUE: (Segue identifier) I could call from the B Viewcontroller.

Thanks very much for your help and suggestions.

  • 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-17T23:52:29+00:00Added an answer on June 17, 2026 at 11:52 pm

    In your “A” TableView, you should be able to peek at which row was poked, and then push that information to your “B” table. For example:

    -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
        if([[segue identifier] isEqualToString:@"UITableView_B"]){
            BTableViewController *vc = (BTableViewController *)[segue destinationViewController];
            NSIndexPath *path;
            path = [self.tableView indexPathForSelectedRow];
            [vc setSelectedPath:path];
        }
    }
    

    Hope that helps. Best of luck.

    Edit: Probably obvious, but in the above “self.tableView” is an outlet pointing at the UITableView.

    Update
    Personally, I’d bite the bullet and make a class for “A”, but in the interest of hacking – it should be possible to reach back and get data from the previous view. This is ‘bad code’ (imo) and assumes you’re using a Navigation Controller – and that the previous view is an “A” table, etc… Without further ado – is should be possible to just do this:

    NSArray * views = [self.navigationController viewControllers];
    NSUInteger prevViewIndex = [views count] - 2;
    UIViewController * previousView = [views objectAtIndex:prevViewIndex];
    ATableViewController * aTableViewController = (ATableViewController *) previousView;
    NSIndexPath *path = [aTableViewController.tableView indexPathForSelectedRow];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a pretty simple question.. lets say I have the following. wordArray WORD
Pretty simple question: say I have a set of files: a1.txt a2.txt a3.txt b1.txt
i have pretty simple simple question (i hope so). How do i change the
I have a pretty simple question which perhaps someone familiar with Server/Client design &
Pretty simple question. I have a few ASP RequiredFieldValdators checking some text boxes. Out
Pretty simple question. I'm quite certain I have the Class, method, codebehind, etc linked
hopefully a pretty simple question this time. I have a Select method in a
I have a pretty simple ASP.NET Web Form that looks a bit like the
It's a pretty simple question, I always have to go check here and then
This is a pretty simple question really, but let's say I'm creating a model

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.