// // GoodsSizePayMentCell.m // Asteria // // Created by 王猛 on 2024/1/24. // #import "GoodsSizePayMentCell.h" #import "GoodsDetailsPayV.h" @implementation GoodsSizePayMentCellData @end @interface GoodsSizePayMentCell () @property(nonatomic, strong) GoodsDetailsPayV *payV; @end @implementation GoodsSizePayMentCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } - (void)setupSubviewS{ [self.contentView addSubview:self.payV]; [self.payV mas_makeConstraints:^(MASConstraintMaker *make) { make.left.top.mas_equalTo(10); make.width.mas_equalTo(KScreenWidth-20); make.height.mas_equalTo(78); make.bottom.mas_equalTo(-10); }]; } - (void)configData:(id)Data{ GoodsSizePayMentCellData *model = (GoodsSizePayMentCellData *)Data; self.payV.titleLab.text = [NSString stringWithFormat:@"Pay in 4 interest-free payments of %@%.2f with",model.currency_symbol,model.final_prices_f/4]; } -(GoodsDetailsPayV *)payV{ if(!_payV){ _payV = [[GoodsDetailsPayV alloc]initWithFrame:CGRectMake(10, 0, KScreenWidth-20, 78)]; _payV.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"]; _payV.layer.cornerRadius = 4; _payV.clipsToBounds = YES; } return _payV; } @end