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

The Archive Base Latest Questions

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

My purpose is when the user click on a button in view1 (to go

  • 0

My purpose is when the user click on a button in view1 (to go to the view2), i will send all the selected cells from UITableView just checked in view1 to the view2.
So before passing the table to next view, i wanted to test if i am on the right track, but seems not. This is my code:

-(IBAction)goToView2{
    //get all section selectioned items into an array
    themesChosed=[tView indexPathsForSelectedRows];//tView is the outlet of my UITableView and themesChosed is an NSArray declared in the .h file
    for (int i=0; i<=[themesChosed count]; i++) {
        NSLog(@"%i",[[themesChosed objectAtIndex:i]integerValue]);
    }


}

This always returning me a single 0.

2012-01-13 15:52:06.472 MyApp[876:11603] 0

Although i selected several items on the table.

  • 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-28T04:42:21+00:00Added an answer on May 28, 2026 at 4:42 am

    The objects in themesChosed are NSIndexPath objects. You’ll want to access the row and section properties like so:

    -(IBAction)goToView2{
        //get all section selectioned items into an array
        themesChosed=[tView indexPathsForSelectedRows];//tView is the outlet of my UITableView and themesChosed is an NSArray declared in the .h file
        for (int i=0; i<=[themesChosed count]; i++) {
            NSIndexPath *thisPath = [themesChosed objectAtIndex:i];
            NSLog(@"row = %i, section = %i", thisPath.row, thisPath.section);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to bind a selected user's role to a dropdown-list. The purpose of
I am trying to animate a div when the user click the button. Each
My purpose is to deploy user configuration files under: $HOME/.appname for Unix/Linux. \Documents and
User Controls -- Do they serve a special purpose? As far as I can
What's the purpose of having the Simulated User Interface elements, i.e. the top and
I have a user control that I'm building. It's purpose is to display the
For testing purposes I want send mail to my localhost user account rather than
I have a button on my ASP.NET page, which fetches some data from my
I have a UITableView with 8 cells(sections) in total in which 6 of them
I have a form with a textbox and a add button. The user can

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.