1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- //
- // JXGuanFCeshiCell.m
- // shiku_im
- //
- // Created by 123 on 2020/4/28.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXGuanFCeshiCell.h"
- #import "UIView+LK.h"
-
- @interface JXGuanFCeshiCell()
-
- @property (nonatomic, strong)UIImageView *IMGHead;
-
- @property (nonatomic, weak)UILabel *contentL;
-
- @end
- @implementation JXGuanFCeshiCell
-
- -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
-
- if(self= [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
-
-
- self.IMGHead = [[UIImageView alloc] init];
- self.IMGHead.image = [UIImage imageNamed:@""];
- [self addSubview:self.IMGHead];
- [self.IMGHead mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(self.centerY).mas_offset(0);
- make.left.mas_equalTo(10);
- }];
-
-
- UILabel *contentL = [[UILabel alloc]init];
- contentL.font=[UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
- contentL.textColor=[UIColor blackColor];
- contentL.textAlignment=NSTextAlignmentLeft;
- contentL.numberOfLines=3;
- [self addSubview:contentL];
- self.contentL=contentL;
- [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(self.IMGHead.mas_right).mas_offset(15);
- make.centerY.mas_equalTo(self.IMGHead.centerY).mas_offset(0);
-
- }];
-
- UIView *line_view = [[UIView alloc]init];
- line_view.backgroundColor=[UIColor lightGrayColor];
- [self addSubview:line_view];
- [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(50);
- make.right.mas_equalTo(0);
- make.bottom.mas_equalTo(0);
- make.height.mas_equalTo(1);
-
- }];
-
- }
-
- return self;
- }
-
- +(instancetype)cellWithTableView:(UITableView *)tableView{
-
- static NSString *ID = @"JXGuanFCeshiCell";
- JXGuanFCeshiCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
- if (cell == nil) {
- cell = [[JXGuanFCeshiCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
- }
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- return cell;
-
- }
-
- @end
|