Question

I have a tableView populated with custom tableViewCells. The cells are not subclasses, they are merely tableViewCells which have had a lot of tweaking and "subview-adding"(done in the cellForRowAtIndexPath method). The problem occurs when i tap the edit button. Have a look:

PICTURE_1

I know the "delete badge" is hovering above the text, I'll fix that later. My problem is that the "delete badge" and the reorderControl assumes the color of the table's backgroundColor(which I've set to be the same as the top row). I've tried doing this: cell.accessoryView.backgroundColor = [UIColor clearColor] But it doesn't help which I assume is because the "delete badge" and reorderControl are not displayed in the accesoryView. My problem does not only count for the badge and the reorder control. It also counts for the delete button that appears when I press the delete-badge.

So do anybody know how to fix this? I'm really stuck here.

Thanks.

Was it helpful?

Solution

Looks like you need to assign a background view to your cells, and give that a background color:

cell.backgroundView = [[[UIView alloc] initWithFrame: cell.bounds] autorelease]; cell.backgroundView.backgroundColor = [UIColor gray];

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top