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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:24:49+00:00 2026-06-03T01:24:49+00:00

Hello all and thanks for your time. I would like to know How I

  • 0

Hello all and thanks for your time.
I would like to know How I can build a list of all the cell data selected and write that into an array which I then write into a .plist

I just want to keep adding to the “*selecedArray” object from the selected cells.

When I “NSLog” my data the current code below shows that I over write the last selection therefore… I end up with the last selected cell. Hope that makes sense.

Thanks Ahab.

NSMutableArray *selectedArray = [[NSMutableArray alloc] init];
  NSMutableDictionary *New_myData = [[NSMutableDictionary alloc] initWithCapacity:1];
  NSString *selected = [prodArray objectAtIndex:indexPath.row];
  [selectedArray addObject:selected];
  [New_myData setValue:selectedArray forKey:@"SelctedPrds"];

   NSLog( @"data from BuildString %@", New_myData);
  • 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-03T01:24:51+00:00Added an answer on June 3, 2026 at 1:24 am

    Is this code in your tableView:didSelectRowAtIndexPath: method?

    If so, you’re creating a new array NSMutableArray *selectedArray every time the user selects a row, which means it will always have a single item (i.e. the row that was just selected).

    You need an array in a higher scope. Try setting up selectedArray as an instance variable/property on the class. You’ll need to initialize the array in the class’s init method. Then when the user selects a row, add it to the array and it will hold onto its state properly.

    You may also need to code to release the memory (if you’re not using ARC) and perhaps some way to clear out the array (if there’s a “clear” or “deselect all” kind of option in your app)

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

Sidebar

Related Questions

Hello all and thanks for your time reading this. I need to verify certificates
Hello everyone and thank you for your time. I would just like to say
Hello all and thanks for your time. I believe I have a simple question.
Hello all would anyone know how flickr manage to make this type of effect
Hello and thanks for your time, I am creating an application that moves video
Hello all Thanks for your previous replies hey i am unable to install the
Hello all and thanks for the help, I need to write every row from
Hello and thanks for your time! While trying to implement the Form Wizard I
Thank you all for your answers and time! Hello, I've been trying to call
var doc = w.document; doc.open('application/CSV','replace'); doc.charset = utf-8; doc.write(all,hello); doc.close(); if(doc.execCommand(SaveAs,null,file.csv)) { window.alert(saved );

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.