Skip to content

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

Description

@albertjson
    [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];
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions