// // YOUPAIProfileMenuItemContentCell.m // MSYOUPAI // // Created by xiaohaoran on 2022/3/7. // Copyright © 2022 MS. All rights reserved. // #import "YOUPAIProfileMenuItemContentCell.h" #import "YOUPAIHRMedalView.h" @implementation YOUPAIProfileMenuItemContentCell - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { self.selectionStyle = UITableViewCellSelectionStyleNone; [self youpaifinitialValue]; [self youpaifinitUI]; } return self; } - (void)youpaifinitialValue{ self.youpaiplz_accessoryType = LZTableViewCellAccessoryNone; } -(void)setYoupaipisShow:(NSString*)isShow{ _youpaipisShow = isShow; if ([self.youpaipisShow isEqualToString:@"1"]) { self.youpaipredView.hidden = NO; }else{ self.youpaipredView.hidden = YES; } } - (void)youpaifinitUI{ self.youpaipimgV = [[UIImageView alloc] init]; [self.contentView addSubview:self.youpaipimgV]; [self.youpaipimgV mas_makeConstraints:^(MASConstraintMaker *make) { make.left.offset(13.0f); make.centerY.mas_equalTo(0); make.width.height.offset(32.0f); }]; self.youpaiptextL = [[UILabel alloc] init]; self.youpaiptextL.font = LCFont(14.0f); self.youpaiptextL.textColor = LZ273145Color; [self.contentView addSubview:self.youpaiptextL]; [self.youpaiptextL mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.youpaipimgV.mas_right).offset(7.0f); make.centerY.mas_equalTo(0); }]; self.youpaipsubTextL = [[UILabel alloc] init]; self.youpaipsubTextL.font = LCFont(12.0f); self.youpaipsubTextL.textColor = HexColorFromRGB(0x9F9DA5); [self.contentView addSubview:self.youpaipsubTextL]; [self.youpaipsubTextL mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.youpaiptextL.mas_right).offset(3.0f); make.centerY.mas_equalTo(0); }]; self.youpaiprightArrowImgV = [[UIImageView alloc] init]; self.youpaiprightArrowImgV.image = [UIImage imageNamed:@"vqu_images_D_profile_item_arrow1"]; self.youpaiprightArrowImgV.hidden = YES; [self.contentView addSubview:self.youpaiprightArrowImgV]; [self.youpaiprightArrowImgV mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-13.0f); make.width.height.offset(10.0f); make.centerY.equalTo(0); }]; self.youpaiprightLabel = [[UILabel alloc] init]; self.youpaiprightLabel.font = LCFont(12.0f); self.youpaiprightLabel.textColor = HexColorFromRGB(0x9F9DA5); [self.contentView addSubview:self.youpaiprightLabel]; [self.youpaiprightLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self.youpaiprightArrowImgV.mas_left).offset(-10.0f); make.centerY.equalTo(0); }]; self.youpaiprightLabel.hidden = YES; self.youpaiprightSwitch = [UIButton buttonWithType:UIButtonTypeCustom]; [self.youpaiprightSwitch setImage:[UIImage imageNamed:@"vqu_images_ic_profile_siwch_on"] forState:UIControlStateSelected]; [self.youpaiprightSwitch setImage:[UIImage imageNamed:@"vqu_images_ic_profile_siwch_off"] forState:UIControlStateNormal]; self.youpaiprightSwitch.hidden = YES; [self.contentView addSubview:self.youpaiprightSwitch]; [self.youpaiprightSwitch mas_makeConstraints:^(MASConstraintMaker *make) { make.right.offset(-20.0f); make.centerY.equalTo(0); make.size.mas_offset(CGSizeMake(27.5f, 44.0f)); }]; UIView *line = [[UIView alloc] init]; self.line = line; line.backgroundColor = LZF5F4F7Color; [self.contentView addSubview:line]; [line mas_makeConstraints:^(MASConstraintMaker *make) { make.left.offset(2.0f); make.right.offset(-2.0f); make.height.offset(0.5f); make.bottom.offset(0.0f); }]; YOUPAILCBaseInfo *userinfo = [LCSaveModel getUserModel].youpaipuserinfo; self.youpaiprightWidth = 54; CGFloat width = 0; for (int i =0 ; i