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

自定义header,下拉过快,程序崩溃 #1615

Open
riluoxiyanghuanghun opened this issue Sep 20, 2024 · 2 comments
Open

自定义header,下拉过快,程序崩溃 #1615

riluoxiyanghuanghun opened this issue Sep 20, 2024 · 2 comments
Labels
bug detail-Need(Demo) 需要更多信息

Comments

@riluoxiyanghuanghun
Copy link

  • (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
    {
    // 遇到这些情况就直接返回
    if (!self.userInteractionEnabled) return;

    // 这个就算看不见也需要处理
    if ([keyPath isEqualToString:MJRefreshKeyPathContentSize]) {
    [self scrollViewContentSizeDidChange:change];
    }

    // 看不见
    if (self.hidden) return;
    if ([keyPath isEqualToString:MJRefreshKeyPathContentOffset]) {
    [self scrollViewContentOffsetDidChange:change]; 此处位置会崩溃
    } else if ([keyPath isEqualToString:MJRefreshKeyPathPanState]) {
    [self scrollViewPanStateDidChange:change];
    }
    }

@gitph101
Copy link

gitph101 commented Sep 20, 2024 via email

@309598016
Copy link

309598016 commented Sep 20, 2024 via email

@wolfcon wolfcon added the detail-Need(Demo) 需要更多信息 label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug detail-Need(Demo) 需要更多信息
Projects
None yet
Development

No branches or pull requests

4 participants