123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- //
- // JXnMyCell.m
- // shiku_im
- //
- // Created by 123 on 2020/5/15.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXnMyCell.h"
- @interface JXnMyCell()
- @property (nonatomic,weak) UIImageView *leftIMG;
- @property (nonatomic,weak) UILabel *leftLab;
- @property (nonatomic,weak) UILabel *rightL;
- @end
- @implementation JXnMyCell
- - (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:@"组20"];
- [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(self.contentView.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.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(rightIMG.mas_left).mas_offset(-10);
- }];
-
-
-
- }
-
- return self;
- }
- + (instancetype)cellWithTableView:(UITableView *)tableView
- {
- static NSString *ID = @"JXnMyCell";
- JXnMyCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
-
- if (!cell) {
- cell = [[JXnMyCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- }
- // cell.selectionStyle=UITableViewCellAccessoryDisclosureIndicator;
-
- return cell;
- }
-
- -(void)setModeL:(StatusesModel *)modeL{
- _modeL=modeL;
- self.leftIMG.image=[UIImage imageNamed:modeL.leftIMG];
- self.leftLab.text=modeL.text;
- self.rightL.text=modeL.subtile;
- }
- -(void)setFrame:(CGRect)frame{
-
- frame.origin.y+=10;
- frame.size.height-=10;
- [super setFrame:frame];
- }
- @end
|