123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- //
- // XMGXianShiMshaCell.m
- // 振飞商城
- //
- // Created by 123 on 2020/5/16.
- // Copyright © 2020 Vibration Fly. All rights reserved.
- //
- #import "XMGXianShiMshaCell.h"
- @interface XMGXianShiMshaCell()
-
- @property (nonatomic,weak) UILabel *titleL;
- @property (nonatomic,weak) UILabel *contenL;
- @property (nonatomic,weak) UIImageView *headIMG;
- @property (nonatomic,weak) UILabel *jiangJL;
- @end
- @implementation XMGXianShiMshaCell
- -(instancetype)initWithFrame:(CGRect)frame{
- if (self=[super initWithFrame:frame]) {
- self.userInteractionEnabled=YES;
- // self.backgroundColor=[UIColor clearColor];
- self.layer.cornerRadius=5;
- self.layer.masksToBounds=YES;
-
-
- UILabel *titleL = [[UILabel alloc] init];
- titleL.font=[UIFont systemFontOfSize:18 weight:UIFontWeightBold];
- titleL.textColor=kRGBColor(255, 229, 182);
- titleL.text=@"盈利榜";
- titleL.textAlignment=NSTextAlignmentCenter;
- [self addSubview:titleL];
- self.titleL=titleL;
-
- UIImageView *headIMG = [[UIImageView alloc] init];
- headIMG.contentMode=UIViewContentModeScaleAspectFit;
- headIMG.image=[UIImage imageNamed:@"组1"];
- headIMG.userInteractionEnabled=YES;
- [self addSubview:headIMG];
- self.headIMG=headIMG;
-
- UILabel *contenL = [[UILabel alloc] init];
- contenL.font=[UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
- contenL.textColor=kRGBColor(255, 229, 182);
- contenL.textAlignment=NSTextAlignmentCenter;
- contenL.text=@"宸荨樱桃";
- [self addSubview:contenL];
- self.contenL=contenL;
-
-
- UILabel *jiangJL = [[UILabel alloc] init];
- jiangJL.font=[UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
- jiangJL.textColor=kRGBColor(255, 229, 182);
- jiangJL.textAlignment=NSTextAlignmentCenter;
- jiangJL.text=@"盈利奖金:70000";
- [self addSubview:jiangJL];
- self.jiangJL=jiangJL;
-
-
-
- [self UIlayoutSubviews];
- }
-
- return self;
- }
- - (void)UIlayoutSubviews{
-
- [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(20);
- make.left.and.right.mas_equalTo(0);
- }];
- [self.headIMG mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(self.titleL.mas_bottom).mas_offset(13);
- make.centerX.mas_equalTo(self.mas_centerX);
-
- }];
-
- [self.contenL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(self.headIMG.mas_bottom).mas_offset(13);
- make.left.mas_equalTo(0);
- make.right.mas_equalTo(0);
- }];
-
- [self.jiangJL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(self.contenL.mas_bottom).mas_offset(5);
- make.left.mas_equalTo(0);
- make.right.mas_equalTo(0);
- }];
-
- }
- -(void)setShaModel:(StatusesModel *)shaModel{
-
- _shaModel=shaModel;
- //self.headIMG.image=[UIImage imageNamed:shaModel.image];
-
- ///self.titleL.text=[NSString stringWithFormat:@"%@",shaModel.money];
- // self.contenL.text=shaModel.subtile;
- if ([shaModel.type intValue]==1) {
- self.jiangJL.text=[NSString stringWithFormat:@"盈利奖金%@",shaModel.money];
- }else if([shaModel.type intValue]==2){
- self.jiangJL.text=[NSString stringWithFormat:@"充值榜%@",shaModel.money];
- }else if([shaModel.type intValue]==3){
- self.jiangJL.text=[NSString stringWithFormat:@"打码榜%@",shaModel.money];
- }
-
- }
- @end
|