Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegate comparison not correct #11

Open
pcolton opened this issue Mar 18, 2014 · 0 comments
Open

Delegate comparison not correct #11

pcolton opened this issue Mar 18, 2014 · 0 comments

Comments

@pcolton
Copy link

pcolton commented Mar 18, 2014

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];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant