| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //
- // MOSecurityStatusCell.m
- // MiMoLive
- //
- // Created by SuperC on 2025/3/10.
- //
- #import "MOSecurityStatusCell.h"
- @interface MOSecurityStatusCell ()
- @property (weak, nonatomic) IBOutlet NSLayoutConstraint *bgHeight;
- @property (weak, nonatomic) IBOutlet UIView *bgView;
- @property (weak, nonatomic) IBOutlet UILabel *titleLabel;
- @property (weak, nonatomic) IBOutlet UIImageView *startView;
- @property (weak, nonatomic) IBOutlet NSLayoutConstraint *startWidth;
- @property (weak, nonatomic) IBOutlet UILabel *statusLabel;
- @end
- @implementation MOSecurityStatusCell
- - (void)awakeFromNib {
- [super awakeFromNib];
-
- self.backgroundColor = [UIColor clearColor];
- //Cell 去除选中效果
- self.selectionStyle = UITableViewCellSelectionStyleNone;
-
- self.bgView.backgroundColor = [MOTools colorWithHexString:@"#FFFFFF"];
- self.bgView.layer.masksToBounds = YES;
- self.bgView.layer.cornerRadius = 16;
-
- self.bgHeight.constant = SCREENWIDTH;
-
- self.titleLabel.font = [MOTextTools regularFont:16];
- self.titleLabel.textColor = kBaseTextColor_1;
- self.titleLabel.text = NSLocalString(@"mimo_mine_account_security_tip_one");
-
- self.statusLabel.font = [MOTextTools semiboldFont:16];
- self.statusLabel.textColor = [MOTools colorWithHexString:@"#F23051"];
- }
- - (void)setCellModel:(MOSecurityData *)cellModel{
- _cellModel = cellModel;
-
- if(cellModel.level == 2){//hight
- self.startView.image = [UIImage imageNamed:@"icon_account_leve_hight"];
- self.startWidth.constant = 72;
- self.statusLabel.text = NSLocalString(@"mimo_security_high");
- self.statusLabel.textColor = [MOTools colorWithHexString:@"#4363FF"];
- }
- else{//low
- self.startView.image = [UIImage imageNamed:@"icon_account_leve_low"];
- self.startWidth.constant = 30;
- self.statusLabel.text = NSLocalString(@"mimo_security_low");
- self.statusLabel.textColor = [MOTools colorWithHexString:@"#F23051"];
- }
- }
- @end
|