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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:29:49+00:00 2026-05-29T05:29:49+00:00

I have a problem using iOS 5 new functionality to select multiple cells during

  • 0

I have a problem using iOS 5 new functionality to select multiple cells during editing mode.
The application structure is the following:

-> UIViewController
---> UITableView
----> CustomUITableViewCell

where UIViewController is both the delegate and the data source for the UITableView (I’m using an UIViewController instead of UITableViewController for requirement reasons and I cannot change it). Cells are loaded into the UITableView like the following code.

- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    CustomTableViewCell *cell = (CustomTableViewCell*)[tv dequeueReusableCellWithIdentifier:kCellTableIdentifier];
    if (cell == nil)
    {
        [[NSBundle mainBundle] loadNibNamed:@"CustomTableViewCellXib" owner:self options:nil];     
        cell = self.customTableViewCellOutlet;    
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }

    // configure the cell with data
    [self configureCell:cell atIndexPath:indexPath];    

    return cell;
}

The cell interface has been created from a xib file. In particular, I’ve created a new xib file where the superview consists of a UITableViewCell element. To provide customization, I set the type for that element as CustomUITableViewCell, where CustomUITableViewCell extends UITableViewCell.

@interface CustomTableViewCell : UITableViewCell

// do stuff here

@end

The code works well. In the table custom cells are displayed. Now, during application execution I set allowsMultipleSelectionDuringEditing to YES and I enter the edit mode for the UITableView. It seems working. In fact, alongside of each cell an empty circle appears. The problem is that when I select a row the empty circle doesn’t change its state. In theory, the circle has to change from empty to red checkmark and viceversa. It seems that circle remains above the contentView for the cell.

I’ve made a lot of experiments. I’ve also checked also that following method.

- (NSArray *)indexPathsForSelectedRows

and it gets updated during selection in editing mode. It displays the right selected cells.

The thing that it’s not so clear to me is that when I try to work without a custom cell, only with UITableViewCell, the circle updates its state correctly.

Do you have any suggestion? Thank you in advance.

  • 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-29T05:29:50+00:00Added an answer on May 29, 2026 at 5:29 am

    For those interested in, I’ve found a valid solution to fix the previous problem.
    The problem is that when selection style is UITableViewCellSelectionStyleNone red checkmarks in editing mode aren’t displayed correctly. The solution is to create a custom UITableViewCell and ovverride some methods. I’m using awakeFromNib because my cell has been created through xib. To reach the solution I’ve followed these two stackoverflow topics:

    1. multi-select-table-view-cell-and-no-selection-style
    2. uitableviewcell-how-to-prevent-blue-selection-background-w-o-borking-isselected

    Here the code:

    - (void)awakeFromNib
    {
        [super awakeFromNib];
    
        self.backgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"row_normal"]] autorelease];
        self.selectedBackgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"row_selected"]] autorelease];
    }
    
    - (void)setSelected:(BOOL)selected animated:(BOOL)animated
    {
        if(selected && !self.isEditing)
        {
    
            return;
        }        
    
        [super setSelected:selected animated:animated];
    }
    
    - (void)setHighlighted: (BOOL)highlighted animated: (BOOL)animated
    {
        // don't highlight
    }
    
    - (void)setEditing:(BOOL)editing animated:(BOOL)animated
    {
        [super setEditing:editing animated:animated];
    
    }
    

    Hope it helps.

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

Sidebar

Related Questions

i have problem using LIKE structure in DB2 : for example: select * from
I have problem using arabic font for iOS. All fonts have the same render,
I am new to ios developing. I have using a camera option in my
I'm developing an iOS 4 application using latest SDK and XCode 4.2. I have
I have problem while using jquery maskedinput with asp.net textbox. I have a check
I have a problem using Linq to NHibernate to load an object and eagerly
I have a problem using the SSIS. I try to import data from database
I have a problem using JSON and arrays. Here is my code: while($row =
i have a problem using the Catch Clipboard Events code found on this link
I have a problem using the string function erase with iterators. The function below

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.