| | |
| | | // |
| | | |
| | | #import "RecommendTwoColumnCell.h" |
| | | #define BSKPlaceHolderImage [UIImage imageNamed:@"默认加载图片"] |
| | | |
| | | @interface RecommendTwoColumnCell () |
| | | |
| | |
| | | - (void)setData:(NSDictionary *)data { |
| | | _data = data; |
| | | if (data) { |
| | | [_imaegView setYthImageWithURL:data[@"Hpicture"] placeholderImage:nil]; |
| | | [self laodata:data]; |
| | | } |
| | | } |
| | | |
| | | - (void)setDataNormol:(NSDictionary *)dataNormol { |
| | | if (_dataNormol) { |
| | | [self laodata:dataNormol]; |
| | | } |
| | | } |
| | | |
| | | - (void)laodata:(NSDictionary *)data { |
| | | [_imaegView setYthImageWithURL:data[@"Hpicture"] placeholderImage:BSKPlaceHolderImage]; |
| | | self.labelTag.text = data[@"Tag"]; |
| | | |
| | | if (data[@"Score"]) { |
| | |
| | | height = 34; |
| | | } |
| | | self.labelTitle.sd_resetLayout.leftSpaceToView(self.contentView, 0).topSpaceToView(self.imaegView, 6).rightSpaceToView(self.contentView, 0).heightIs(height); |
| | | } |
| | | } |
| | | |
| | | - (CGFloat)fetchLabelHeight:(NSString *)string fontSize:(NSInteger)fontSize width:(float)width { |