1

I want to disallow selection of certain UITableViewCells in a grouped table. Using selectionStyle = UITableViewSelectionStyleNone works and so does willSelectRowAtIndexPath.

The issue is at the top of each of the groups of cells there is a shadow that disappears when a finger touches down on the top cell and reappears when it lifts off. How do I turn it off?

Thanks =)

aaronium112
  • 2,992
  • 4
  • 35
  • 50

1 Answers1

0

That shadow is from the UITableView "Separator" dropdown in Interface Builder: "Single Line Etched". The best way to handle it is subclass UITableViewCell to prevent the cell from changing the highlight:

- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {}
    [super setHighlighted:NO animated:animated];
}

For more details, check out Removing text shadow in UITableViewCell when it's selected.

Community
  • 1
  • 1
bdunagan
  • 1,202
  • 12
  • 15