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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:51:44+00:00 2026-05-27T03:51:44+00:00

I am developing an application which has a UITableView with custom UITableViewCells . The

  • 0

I am developing an application which has a UITableView with custom UITableViewCells. The cells contain checkboxes and 3 labels. The user can select multiple rows by clicking on the checkboxes. When I select more than one row and scroll the table view, the checkmark vanishes from the checkbox. This means the selected rows are changed to unselected mode. How this can be fixed?

  • 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-27T03:51:45+00:00Added an answer on May 27, 2026 at 3:51 am

    I think your problem may be with cell reuse. Create an NSMutableDictionary in your controller (should be and instance variable), and create it like so:

    dictionary = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                     [NSNumber numberWithBool:NO], [NSIndexPath indexPathForRow:0 inSection:0],
                     [NSNumber numberWithBool:NO], [NSIndexPath indexPathForRow:1 inSection:0], nil];
    

    Do this for all your rows, or if needed, calculate the rows and their indexes, but set all their objects to [NSNumber numberWithBool:NO.

    Now, in tableView:didSelectRowAtIndexPath:

    if ([(NSNumber *)[dictionary objectForKey:indexPath] isEqualToNumber:[NSNumber numberWithBool:NO]) {
        [dictionary setObject:[NSNumber numberWithBool:YES] forKey:indexPath];
        // Do any visual updating necessary
    } else {
        [dictionary setObject:[NSNumber numberWithBool:NO] forKey:indexPath];
        // Do any visual updating necessary
    }
    

    Now that we have a way of storing whether a cell is selected or not, change your cell identifier to work for your cells:

    NSString *identifier = [[dictionary objectForKey:indexPath] stringValue];
    UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:identifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifier] autorelease];
    }
    
    // Do any visual updating necessary
    return cell;
    

    Now, update your custom cell class to accept @"0" and @"1" as identifiers, and update their selected state automatically based on this input.

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

Sidebar

Related Questions

I am currently developing an Android application which has a web backend. I can
I am developing a simple application which has to send an SMS message from
Im Developing a web application which is very critical. So authentication has to be
I am developing an asp.net mvc application, which has these enity classes: public class
I am developing an application which requires real-time updates to the end user. However,
I have been developing Android application which has 3 ListView and one ContextMenu for
I am developing a web application which has form based authentication. All pages needs
I am developing a GTK based application which has to support clipboard. For that
I am developing a Silverlight application which has a list <ListBox x:Name=_list_collection SelectionChanged=SelectionChanged ScrollViewer.VerticalScrollBarVisibility=Auto
I'm developing an iPad Application, in which one of the screens has an embedded

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.