ios9没事,ios7tableviewcell报约束冲突问题
如果在ios9上也打印冲突,那么就可以解决它,可是实际情况是9上完全ok,7上全是冲突,而且cell高度计算也出现了问题,
self.contentView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
这句话加到init方法中就行了
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.contentView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self createSubViews];
}
return self;
}