// // KDPUserInfoListCell.m // KuDianProject // // Created by 学丽 on 2019/7/9. // Copyright © 2019 KDP. All rights reserved. // #import "KDPUserInfoListCell.h" @implementation KDPUserInfoListCell -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { [self addSubview:self.nickLabel]; [self addSubview:self.contentLabel]; [self addSubview:self.iconImgV]; [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(14); make.top.bottom.mas_equalTo(0); }]; [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(110); make.top.bottom.mas_equalTo(0); }]; [self.iconImgV mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(110); make.width.height.mas_equalTo(33); make.top.mas_equalTo(12); }]; UIView *lineV=[[UIView alloc]init]; lineV.backgroundColor=[UIColor colorWithHexString:LineColor]; [self addSubview:lineV]; [lineV mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(10); make.right.mas_equalTo(-10); make.top.mas_equalTo(self.mas_bottom).offset(-1); make.height.mas_equalTo(1); }]; } return self; } -(UILabel *)nickLabel { if (!_nickLabel) { _nickLabel=[[UILabel alloc]init]; _nickLabel.textColor=[UIColor colorWithHexString:@"#3E3E3E"]; _nickLabel.font=[UIFont systemFontOfSize:16]; } return _nickLabel; } -(UILabel *)contentLabel { if (!_contentLabel) { _contentLabel=[[UILabel alloc]init]; _contentLabel.text=@"---"; _contentLabel.font=[UIFont systemFontOfSize:14]; _contentLabel.textColor=[UIColor colorWithHexString:@"#999999"]; _contentLabel.hidden=YES; } return _contentLabel; } -(UIImageView *)iconImgV { if (!_iconImgV ) { _iconImgV =[[UIImageView alloc]init]; _iconImgV.hidden=YES; } return _iconImgV; } @end