Reputation: 14886
Is is possible to get rid of this white line that shows up when my UITableView is in editing mode?
Upvotes: 1
Views: 293
Reputation: 14886
I eventually found the solution:
Remove it be iterating through subviews in visible cells:
-(void)editTableView {
[self setEditing:YES animated: YES];
for (UITableViewCell *cell in [self.tableView visibleCells]) {
for (UIView *control in cell.subviews) {
if (control.frame.size.width == 1.0f) {
control.backgroundColor = [UIColor clearColor];
}
}
}
}
Remove it for any cells being displayed:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.editing) {
for (UIView *control in cell.subviews) {
if (control.frame.size.width == 1.0f) {
control.backgroundColor = [UIColor clearColor];
}
}
}
}
Upvotes: 1