123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- //
- // JXMyHelpCerCell.m
- // shiku_im
- //
- // Created by 123 on 2020/5/16.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXMyHelpCerCell.h"
- @interface JXMyHelpCerCell()
- @property (nonatomic,weak) UIImageView *leftIMG;
- @property (nonatomic,weak) UILabel *leftLab;
- @property (nonatomic,weak) UILabel *rightL;
-
- @property (nonatomic,weak) UIImageView *rightIMG;
- @end
- @implementation JXMyHelpCerCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
- if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
-
-
-
- UIImageView *leftIMG=[[UIImageView alloc]init];
- leftIMG.image=[UIImage imageNamed:@"helpCenterL"];
- [self.contentView addSubview:leftIMG];
- self.leftIMG=leftIMG;
- [leftIMG mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(self.contentView.mas_centerY);
- make.left.mas_equalTo(15);
- }];
-
- UILabel *leftLab=[[UILabel alloc]init];
- leftLab.text=@"我的上级是谁?";
- leftLab.textColor=kRGBColor51;
- leftLab.font=[UIFont systemFontOfSize:16 weight:UIFontWeightRegular];
- [self.contentView addSubview:leftLab];
- self.leftLab=leftLab;
- [leftLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(leftIMG.mas_centerY);
- make.left.mas_equalTo(leftIMG.mas_right).mas_offset(10);
- }];
-
- UIImageView *rightIMG=[[UIImageView alloc]init];
- rightIMG.image=[UIImage imageNamed:@"组20"];
- [self.contentView addSubview:rightIMG];
- [rightIMG mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(self.contentView.mas_centerY);
- make.right.mas_equalTo(-15);
- }];
-
- UILabel *rightL=[[UILabel alloc]init];
- rightL.text=@"上级联系方式";
- rightL.textColor=kRGBColor151;
- rightL.textAlignment=NSTextAlignmentRight;
- rightL.font=[UIFont systemFontOfSize:13 weight:UIFontWeightRegular];
- [self.contentView addSubview:rightL];
- self.rightL=rightL;
- [rightL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(self.contentView.mas_centerY);
- make.right.mas_equalTo(-40);
- }];
-
- UILabel *line_View=[[UILabel alloc]init];
- line_View.backgroundColor=kRGBColor(246, 246, 246);
- [self.contentView addSubview:line_View];
- self.line_View=line_View;
- [line_View mas_makeConstraints:^(MASConstraintMaker *make) {
- make.bottom.mas_equalTo(self.contentView.mas_bottom);
- make.right.mas_equalTo(-15);
- make.left.mas_equalTo(15);
- make.height.mas_equalTo(1);
- }];
-
- }
-
- return self;
- }
- + (instancetype)cellWithTableView:(UITableView *)tableView
- {
- static NSString *ID = @"JXMyHelpCerCell";
- JXMyHelpCerCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
-
- if (!cell) {
- cell = [[JXMyHelpCerCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- }
-
- return cell;
- }
- -(void)setModeL:(StatusesModel *)modeL{
- _modeL=modeL;
-
- self.leftIMG.image=[UIImage imageNamed:modeL.image];
- self.leftLab.text=modeL.text;
- self.rightL.text=modeL.subtile;
- }
- @end
|