Lucas Fray Burchardt
Lucas Fray Burchardt

Reputation: 409

Editing tableview missing background color while editing on iPad

When I do tableView.setEditing(true, animated: true), cells indent and show the delete button as they're supposed to. However, on iPad, the places where the cell has indented, shows white instead of the background color i've set for the tableview, the cell and the view. This does not happen on iPhone

iPhone: iPhone:

iPad: iPad:

What could be causing this bug?

Thanks in advance

Upvotes: 1

Views: 409

Answers (2)

SandeepAggarwal
SandeepAggarwal

Reputation: 1293

You just require to set background color of the cell's content view to clearColor in -cellForRowAtIndexPath:

 [cell.contentView setBackgroundColor:[UIColor clearColor]];

Upvotes: 1

Helge Becker
Helge Becker

Reputation: 3253

I think you are setting the color in the contentview. Use the cell itself. (UITableViewCells are UIViews)

Upvotes: 0

Related Questions