Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

left circle in UITableViewCell editing mode appears in iOS8

So I just installed Xcode 6GM and fiddled with my iOS7 app on simulator running iOS8.

I have a UITableView that's in editing mode and there's now a circle on the left side of the cell which doesn't appear when running on iOS7.

I glanced at the documentation for iOS8, but I don't see any new constants and I'm using UITableViewCellEditingStyleNone and UITableViewCellSelectionStyleNone.

That circle disappears when tableView.editing = NO, also allowsMultipleSelectionDuringEditing = YES.

If anyone can tell me what's going on that'd be great :)

EDIT: compiling from XCode6GM onto my iPhone running iOS7.1 gives me the circle too. I suspect a bug with XCode6GM?

Here is a screenshot with the circles:

enter image description here

like image 949
JackyJohnson Avatar asked Sep 12 '14 06:09

JackyJohnson


2 Answers

I just had this annoying issue while migrating my app to iOS8.

Here is the workaround I found ... add something like this in your UITableViewCell subclass:

- (void)setEditing:(BOOL)editing animated:(BOOL)animated
{
    [super setEditing:editing animated:animated];
    for( UIView* subview in self.subviews )
        if( [NSStringFromClass(subview.class) isEqualToString:@"UITableViewCellEditControl"] )
            subview.hidden = YES;
}

I hope this will be documented / fixed soon ...

like image 94
nick671 Avatar answered Oct 13 '22 07:10

nick671


I think I have a better solution, add this code to your custom uitableviewcell:

- (void)addSubview:(UIView *)view {
    [super addSubview:view];
    if( [NSStringFromClass(view.class) isEqualToString:@"UITableViewCellEditControl"] ) {
        view.hidden = YES
    }
}
like image 2
MZD Avatar answered Oct 13 '22 07:10

MZD