UITableViewCell delete button gets covered up

I fixed this by finding the delete button view and bringing it to the front. I did this in layoutSubviews in a UITableViewCell subclass.

Here’s a small bit of code that should give you an idea of how to do it:

- (void)layoutSubviews
{
    [super layoutSubviews];

    for (UIView *subview in self.subviews) {

        for (UIView *subview2 in subview.subviews) {

            if ([NSStringFromClass([subview2 class]) isEqualToString:@"UITableViewCellDeleteConfirmationView"]) { // move delete confirmation view

            [subview bringSubviewToFront:subview2];

        }
    }
}

Leave a Comment