Closed Merlini93 closed 5 years ago
目标是做一个评论的cell,评论数不定,也就是变高cell。但是我在setModel的时候更新UI,就算不出来高度,始终是44,请教应该怎么弄?
(void)setDict:(NSDictionary *)dict { _dict = dict;
self.iconImageView.image = kImageNamed(dict[@"icon"]); self.nameLabel.text = dict[@"name"]; self.timeLabel.text = dict[@"time"]; self.descLabel.text = dict[@"content"];
NSArray *array = dict[@"comments"]; if (array.count) { [self updateUI]; } else { [self clearUI]; }
}
目标是做一个评论的cell,评论数不定,也就是变高cell。但是我在setModel的时候更新UI,就算不出来高度,始终是44,请教应该怎么弄?
(void)setDict:(NSDictionary *)dict { _dict = dict;
self.iconImageView.image = kImageNamed(dict[@"icon"]); self.nameLabel.text = dict[@"name"]; self.timeLabel.text = dict[@"time"]; self.descLabel.text = dict[@"content"];
NSArray *array = dict[@"comments"]; if (array.count) { [self updateUI]; } else { [self clearUI]; }
}