7
votes

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

4
Are you able to show a screen shot of the "Left Circle". For your information, there is a new property added to UIView for all the object inherit from it. It might be the "Left Circle" that you mentioned. See: stackoverflow.com/questions/25762723/… - Ricky
@Ricky it doesn't seem to be.. this is like the undocumented UITableViewEditingStyle with index 3 that gives you a circle with a checkmark in it when selected, except the odd part is I can't even get it to "check". I spent an hour going thru the new docs and another hour fiddling around before I decided to post on SO. - JackyJohnson
(In case this is found by others with a slightly different problem.) I was troubled by the overlapping circle too, but in my case I wanted to make use of it. Then I remembered that I had implemented the following: - (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath { return NO; } I changed the return to YES and all was well. - mts

4 Answers

6
votes

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 ...

2
votes

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
    }
}
0
votes

Here's a Swift solution combining the two answers:

override func addSubview(view: UIView) {
    super.addSubview(view)
    if view.isKindOfClass(NSClassFromString("UITableViewCellEditControl")!) {
        view.hidden = true
    }
}
0
votes

Here is the Swift3 version:

override func addSubview(_ view: UIView) {
    super.addSubview(view)
    if view.classAsString() == "UITableViewCellEditControl" {
        view.isHidden = true
    }
}