// // KBTodayReatCollectionCell.m // YouHuiProject // // Created by 小花 on 2018/7/23. // Copyright © 2018年 kuxuan. All rights reserved. // #import "KBTodayReatCollectionCell.h" @interface KBTodayReatCollectionCell () @property (nonatomic, strong) UIImageView *icon; @end @implementation KBTodayReatCollectionCell - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self.contentView addSubview:self.icon]; [self.icon mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.mas_equalTo(UIEdgeInsetsMake(0, 0, 0, 0)); }]; } return self; } - (UIImageView *)icon { if (!_icon) { _icon = [[UIImageView alloc] init]; _icon.backgroundColor = [UIColor yhGrayColor]; _icon.layer.cornerRadius = 4; _icon.layer.masksToBounds = YES; } return _icon; } - (void)setModel:(KBMorePicModel *)model { [self.icon sd_setImageWithURL:[NSURL URLWithString:model.img2]]; } @end