// // YMBindWithdrawalAccountWarmTipsView.m // MSYOUPAI // // Created by YoMi on 2024/3/6. // Copyright © 2024 MS. All rights reserved. // #import "YMBindWithdrawalAccountWarmTipsView.h" #import "YMBindWithdrawalAccountViewModel.h" @interface YMBindWithdrawalAccountWarmTipsView () /// 绑定提现账号VM @property (nonatomic, strong) YMBindWithdrawalAccountViewModel *viewModel; /// 提现说明标题标签 @property (nonatomic, strong) UILabel *bindWithdrawalAccountWarmTipsTitleLb; /// 提现说明内容标签 @property (nonatomic, strong) UILabel *bindWithdrawalAccountWarmTipsContentLb; @end @implementation YMBindWithdrawalAccountWarmTipsView - (void)ym_setupViews{ [self addSubview:self.bindWithdrawalAccountWarmTipsTitleLb]; [self addSubview:self.bindWithdrawalAccountWarmTipsContentLb]; [self setNeedsUpdateConstraints]; [self updateConstraintsIfNeeded]; } - (void)updateConstraints{ [self.bindWithdrawalAccountWarmTipsTitleLb mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self).offset(adapt(10)); make.left.equalTo(self).offset(adapt(15)); }]; [self.bindWithdrawalAccountWarmTipsContentLb mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.bindWithdrawalAccountWarmTipsTitleLb.mas_bottom).offset(adapt(10)); make.left.equalTo(self).offset(adapt(15)); make.right.equalTo(self).offset(adapt(-15)); make.bottom.equalTo(self).offset(adapt(-10)); }]; [super updateConstraints]; } - (void)ym_bindViewModel:(YMBindWithdrawalAccountViewModel *)viewModel{ if (!viewModel) { return; } _viewModel = viewModel; RAC(self.bindWithdrawalAccountWarmTipsContentLb, attributedText) = RACObserve(self.viewModel, bindWithdrawalAccountWarmTips); } - (UILabel *)bindWithdrawalAccountWarmTipsTitleLb{ if (!_bindWithdrawalAccountWarmTipsTitleLb) { _bindWithdrawalAccountWarmTipsTitleLb = [[UILabel alloc]init]; _bindWithdrawalAccountWarmTipsTitleLb.font = LCBoldFont(14); _bindWithdrawalAccountWarmTipsTitleLb.textColor = HexColorFromRGB(0x333333); _bindWithdrawalAccountWarmTipsTitleLb.textAlignment = NSTextAlignmentLeft; _bindWithdrawalAccountWarmTipsTitleLb.text = @"温馨提示"; } return _bindWithdrawalAccountWarmTipsTitleLb; } - (UILabel *)bindWithdrawalAccountWarmTipsContentLb{ if (!_bindWithdrawalAccountWarmTipsContentLb) { _bindWithdrawalAccountWarmTipsContentLb = [[UILabel alloc]init]; _bindWithdrawalAccountWarmTipsContentLb.font = LCFont(11); _bindWithdrawalAccountWarmTipsContentLb.textColor = HexColorFromRGB(0x9b9b9b); _bindWithdrawalAccountWarmTipsContentLb.textAlignment = NSTextAlignmentLeft; _bindWithdrawalAccountWarmTipsContentLb.text = @"******"; _bindWithdrawalAccountWarmTipsContentLb.numberOfLines = 0; } return _bindWithdrawalAccountWarmTipsContentLb; } @end