Closed GPX-NSlog closed 7 years ago
@GPX-NSlog, could you put more codes at least with the method name, and logs too.
@weekwood
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
self.contentView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
if (!_titleLabel) {
_titleLabel = [UILabel labelWithFont:Font(15) textColor:[UIColor colorWithHexString:@"0x111111"]];
_titleLabel.numberOfLines = 0;
[self.contentView addSubview:_titleLabel];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.contentView).offset(16);
make.top.equalTo(self.contentView).offset(10);
make.right.equalTo(self.contentView.mas_right).offset(-16);
}];
}
if (!_timeLabel) {
_timeLabel = [UILabel labelWithFont:Font(14) textColor:[UIColor colorWithHexString:@"0x8C8D91"]];
[self.contentView addSubview:_timeLabel];
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.titleLabel.mas_left);
make.top.equalTo(self.titleLabel.mas_bottom).offset(7);
make.bottom.equalTo(self.contentView.mas_bottom).offset(-10);
}];
}
if (!_browseLabel) {
_browseLabel = [UILabel labelWithFont:Font(14) textColor:[UIColor colorWithHexString:@"0x8C8D91"]];
[self.contentView addSubview:_browseLabel];
[self.browseLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.contentView.mas_left).offset(82);
make.centerY.equalTo(self.timeLabel);
}];
}
}
return self;
}
2017-04-28 15:21:56.266 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
2017-04-28 15:21:56.268 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
2017-04-28 15:21:56.270 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
2017-04-28 15:21:56.273 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
2017-04-28 15:21:56.275 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
2017-04-28 15:21:56.277 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
2017-04-28 15:21:56.279 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
2017-04-28 15:21:56.282 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
2017-04-28 15:21:56.284 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 98
2017-04-28 15:21:56.286 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 98
2017-04-28 15:21:56.967 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 62
2017-04-28 15:21:56.970 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 62
2017-04-28 15:21:57.218 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
2017-04-28 15:21:57.220 xzap[57010:979681] ** FDTemplateLayoutCell ** calculate using system fitting size (AutoLayout) - 80
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return [tableView fd_heightForCellWithIdentifier:gengCellID configuration:^(CHGengCell *cell) {
cell.model = self.audioModels[indexPath.row];
}];
}
@weekwood thanks
- (void)setModel:(CHColimnistDetailModel *)model {
_model = model;
self.titleLabel.text = model.title;
self.timeLabel.text = model.publish_time;
self.browseLabel.text = [NSString stringWithFormat:@" %@人已浏览",model.browse];
}
Please follow this link to use Masonry. Think it will help you to fix the issue. https://github.com/SnapKit/Masonry#where-should-i-create-my-constraints
Let me know if any more question.
I am closing this now, let me know if any issue.