// // KBHistoryMoreCell.m // keyBoard // #import "KBHistoryMoreCell.h" @interface KBHistoryMoreCell () @property (nonatomic, strong) UIView *bgView; @property (nonatomic, strong) UIImageView *iconView; @end @implementation KBHistoryMoreCell - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { self.contentView.backgroundColor = [UIColor clearColor]; [self.contentView addSubview:self.bgView]; [self.bgView addSubview:self.iconView]; [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(self.contentView); }]; [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self.bgView); make.width.height.mas_equalTo(14); }]; } return self; } + (CGSize)fixedSize { return CGSizeMake(32, 32); } #pragma mark - Lazy - (UIView *)bgView { if (!_bgView) { _bgView = [[UIView alloc] init]; _bgView.backgroundColor = [UIColor colorWithWhite:0.96 alpha:1.0]; _bgView.layer.cornerRadius = 16; _bgView.layer.masksToBounds = YES; } return _bgView; } - (UIImageView *)iconView { if (!_iconView) { _iconView = [[UIImageView alloc] initWithImage:[UIImage systemImageNamed:@"chevron.down"]]; _iconView.tintColor = [UIColor colorWithHex:0x9A9A9A]; _iconView.contentMode = UIViewContentModeScaleAspectFit; } return _iconView; } @end