123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //
- // YMMyEarningsWithdrawalNotesView.m
- // MSYOUPAI
- //
- // Created by YoMi on 2024/3/2.
- // Copyright © 2024 MS. All rights reserved.
- //
- #import "YMMyEarningsWithdrawalNotesView.h"
- #import "YMMyEarningsViewModel.h"
- @interface YMMyEarningsWithdrawalNotesView ()
- /// 我的收益VM
- @property (nonatomic, strong) YMMyEarningsViewModel *viewModel;
- /// 提现说明标题标签
- @property (nonatomic, strong) UILabel *withdrawalNotesTitleLb;
- /// 提现说明内容标签
- @property (nonatomic, strong) UILabel *withdrawalNotesContentLb;
- @end
- @implementation YMMyEarningsWithdrawalNotesView
- - (void)ym_setupViews{
- [self addSubview:self.withdrawalNotesTitleLb];
- [self addSubview:self.withdrawalNotesContentLb];
- [self setNeedsUpdateConstraints];
- [self updateConstraintsIfNeeded];
- }
- - (void)updateConstraints{
-
- [self.withdrawalNotesTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(self).offset(adapt(10));
- make.left.equalTo(self).offset(adapt(18));
- }];
-
- [self.withdrawalNotesContentLb mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(self.withdrawalNotesTitleLb.mas_bottom).offset(adapt(12));
- make.left.equalTo(self).offset(adapt(12));
- make.right.equalTo(self).offset(adapt(-12));
- make.bottom.equalTo(self).offset(adapt(-100));
- }];
-
- [super updateConstraints];
- }
- - (void)ym_bindViewModel:(YMMyEarningsViewModel *)viewModel{
- if (!viewModel) {
- return;
- }
-
- _viewModel = viewModel;
-
-
- RAC(self.withdrawalNotesContentLb, attributedText) = RACObserve(self.viewModel, withdrawalNotes);
-
- }
- - (UILabel *)withdrawalNotesTitleLb{
- if (!_withdrawalNotesTitleLb) {
- _withdrawalNotesTitleLb = [[UILabel alloc]init];
- _withdrawalNotesTitleLb.font = LCFont(13);
- _withdrawalNotesTitleLb.textColor = HexColorFromRGB(0x161330);
- _withdrawalNotesTitleLb.textAlignment = NSTextAlignmentLeft;
- _withdrawalNotesTitleLb.text = @"提现说明";
- }
- return _withdrawalNotesTitleLb;
- }
- - (UILabel *)withdrawalNotesContentLb{
- if (!_withdrawalNotesContentLb) {
- _withdrawalNotesContentLb = [[UILabel alloc]init];
- _withdrawalNotesContentLb.font = LCFont(12);
- _withdrawalNotesContentLb.textColor = HexColorFromRGB(0xB4BDD9);
- _withdrawalNotesContentLb.textAlignment = NSTextAlignmentLeft;
- _withdrawalNotesContentLb.text = @"******";
- _withdrawalNotesContentLb.numberOfLines = 0;
- }
- return _withdrawalNotesContentLb;
- }
- @end
|