1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // 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:(LDMorePicModel *)model {
- [self.icon sd_setImageWithURL:[NSURL URLWithString:model.img2]];
- }
- @end
|