iOS 14 UITableViewCell适配问题

阅读 71

2022-08-18


iOS 14 UITableViewCell适配问题:
采用:直接在表格上增加view和按钮会出现按钮不能点击的问题​​​[self.contentView addSubview:self.bgView];​​​,当在​​[self.contentView addSubview:self.bgView];​​增加就没有这样的问题。

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
self.frame = CGRectMake(0, 0, SCREEN_WIDTH, [PPMineCell cellHeight]);
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.bgView];
[self upFrame];

}
return self;
}


精彩评论(0)

0 0 举报