Skip to content

Delegate comparison not correct #11

@pcolton

Description

@pcolton

Pixate Freestyle uses an NSProxy for the delegate, which causes ADLivelyTableView to go into a recursive infinite loop. The cause is that the check in the setDelegate method is using == vs isEqual. It should look like this:

- (void)setDelegate:(id<UITableViewDelegate>)delegate {
    // The order here is important, as there seem to be some observing done on setDelegate:
    if ([delegate isEqual:self]) {
        _preLivelyDelegate = nil;
    } else {
        _preLivelyDelegate = delegate;
    }
    [super setDelegate:self];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions