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

  • Home
  • SEARCH
  • 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 8033881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:50:23+00:00 2026-06-05T01:50:23+00:00

I have a tableView that is configured to Push Segue to another view. The

  • 0

I have a tableView that is configured to Push Segue to another view.
The table is devided into 2 sections.
When i push to the next view I allso transfer data and I have a problem with the sections.

Let’s say my section 0 has 2 row and section 1 has 1 row.
How do I check the section 1 rows?

before storybaords and preper for segue I did

row = indexPath.row;

if (section == 0)
{
    if (row == 0)
        data = @"Zero";

    if (row == 1)
        data = @"One";
}

if (section == 1)
{
    if (row == 0)
        data = @"Two";

    if (row == 1)
        data = @"Three";
}

and now it’s not working. When i click the 0 row in section 1 it put’s “Zero” into data instead of “Two”
Why is that?
How can I effectivly differ between section 0 and section 1?

  • 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-05T01:50:24+00:00Added an answer on June 5, 2026 at 1:50 am

    Dude, where is section = indexpath.section?
    and here is a prepareForSegue example;

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
        NSIndexPath *indexpath = [self.tableView indexPathForCell:sender];
    //    indexpath.section
    //    indexpath.row
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tableview that occupies only the bottom third of my view. I
I have a controller that contains a tableView that spawns another controller modally to
I have a custom tableview cell created programmatically that consists of: a background view
I have a UITableView that is grouped into sections and has a number of
i have an customized cell that is loaded in table view cell and each
Hey guys, I have a Table View that has been populated with 21 data:
I have a table view that i want to populate with information from xml.
I have a table view (view 1) with some cells that when selected let's
I have a tableView that's loosely based on the DetailViewController in ye olde SQLiteBooks.
I have a Tableview on AppDelegate That calls a SecondView (dvController) when DidSelectRowAtIndexPath using:

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.