0
点赞
收藏
分享

微信扫一扫

iOS 14 UITableViewCell适配问题

陈情雅雅 2022-08-18 阅读 71


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 条评论