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

修复iOS 14闪退,以及tableview点击的问题修复 #438

Open
albertjson opened this issue Jan 3, 2024 · 0 comments
Open

修复iOS 14闪退,以及tableview点击的问题修复 #438

albertjson opened this issue Jan 3, 2024 · 0 comments

Comments

@albertjson
Copy link

albertjson commented Jan 3, 2024

    [self.contentView superview];// iOS14 加入这行代码可解决闪退问题,但是会导致table select规律失效
    //不需要兼容ios 7了 故注释下面部分
    //if (![NSStringFromClass([[self.subviews objectAtIndex:0] class]) isEqualToString:kTableViewCellContentView])
    //{
    //    // iOS 7
    //    contentViewParent = [self.subviews objectAtIndex:0];
    //    clipViewParent = self;
    //}
//处理tableview点击失效问题
- (void)scrollViewTapped:(UIGestureRecognizer *)gestureRecognizer
{
    if (_cellState == kCellStateCenter)
    {
        if (self.shouldHighlight) // UITableView refuses selection if highlight is also refused.
        {
            [self selectCell];
        }else {
            [self deselectCell];
        }
    }
    else
    {
        // Scroll back to center
        [self hideUtilityButtonsAnimated:YES];
    }
}
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