// // LDLoadAllgoodCell.m // YouHuiProject // // Created by liuxueli on 2018/12/14. // Copyright © 2018 kuxuan. All rights reserved. // #import "LDLoadAllgoodCell.h" @implementation LDLoadAllgoodCell - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self initSubView]; } return self; } - (void)initSubView { self.layer.cornerRadius = 4; self.layer.masksToBounds = YES; UIImageView *imgView = [[UIImageView alloc] init]; [self.contentView addSubview:imgView]; imgView.image =[UIImage imageNamed:@"top_all_icon"]; UILabel *titleLb = [[UILabel alloc] init]; titleLb.text = @"更多"; titleLb.font = [UIFont systemFontOfSize:14]; titleLb.textColor = [UIColor YHColorWithHex:0x4A4A4A]; titleLb.textAlignment = NSTextAlignmentCenter; [self.contentView addSubview:titleLb]; [imgView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(37.5); make.width.height.mas_equalTo(FITSIZE(60)); make.centerX.mas_equalTo(self.mas_centerX); }]; [titleLb mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.height.mas_equalTo(FITSIZE(20)); make.top.mas_equalTo(imgView.mas_bottom).mas_offset(FITSIZE(5)); }]; } @end