Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For those interested in, I've found a valid solution to fix the previous problem. The problem is that when selection style is <code>UITableViewCellSelectionStyleNone</code> red checkmarks in editing mode aren't displayed correctly. The solution is to create a custom <code>UITableViewCell</code> and ovverride some methods. I'm using <code>awakeFromNib</code> because my cell has been created through xib. To reach the solution I've followed these two stackoverflow topics:</p> <ol> <li><a href="https://stackoverflow.com/questions/4890900/multi-select-table-view-cell-and-no-selection-style">multi-select-table-view-cell-and-no-selection-style</a></li> <li><a href="https://stackoverflow.com/questions/899862/uitableviewcell-how-to-prevent-blue-selection-background-w-o-borking-isselected">uitableviewcell-how-to-prevent-blue-selection-background-w-o-borking-isselected</a></li> </ol> <p>Here the code:</p> <pre><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 &amp;&amp; !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]; } </code></pre> <p>Hope it helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload