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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:38:16+00:00 2026-06-15T14:38:16+00:00

I have a grouped table view with multiple cells in each group.What I want

  • 0

I have a grouped table view with multiple cells in each group.What I want is, when user selects any perticular cell; I want to show child element of the particular selected cell.

For example: If user selects "A" then I should show "A1","A2","A3"... Or "B" then it should show "B1","B2","B3"...**In another viewcontroller’s table object.**

There is no restriction on hard-coding the child values. My segue is connected from the table view to another viewcontroller.

  • 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-15T14:38:17+00:00Added an answer on June 15, 2026 at 2:38 pm

    In your second view controller create a property

    @property (nonatomic) NSIndexPath *parentIndex;
    

    and synthesize it in .m file

    @synthesize parentIndex;
    

    In your first tableview controller create an ivar

    NSIndexPath *passIndexPath;
    

    and in your table delegate

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
        passIndexPath = indexPath;
       [self performSegueWithIdentifier:@"push_SecondTableViewController" sender:self];
    }
    

    Now implement the following function it will run right when you trigger your segue

    - (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
    
        if ([[segue identifier] isEqualToString:@"push_SecondTableViewController"])
        {
          Your_SecondViewController *viewController = [segue destinationViewController];
    
          viewController.parentIndex = passIndexPath; 
         //Here we are passing the indexpath of the selected cell so now you can set the 
         //data of the table in second view controller
        }
    }
    

    Now in your SecondView controller with the help of parentIndex you know, which section’s which row was selected and you can display the data accordingly

    Same way you can even pass the data Array for your child cells.

    Hope this will help you,

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

Sidebar

Related Questions

I have Grouped Table View in which I want to display Contact details. But
I have a grouped table view where I want to reload a particular row.
I have a Nib file containing grouped table view and a cell. The cell
I have a UITextView embedded inside a grouped table view cell that I can't
I have a grouped table view with custom cells (created programmatically by subclassing, not
I have a grouped table view that contains 3 sections and each row per
I want to change the background of a grouped table view cell. Say you
I have a grouped table view that utilizes two different custom table cells. When
I have a simple grouped table view that when a cell is selected it
I have a grouped table view and I don't want a see the background

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.