更换项目

This commit is contained in:
liyuhua
2023-07-14 18:50:55 +08:00
parent fff67e0aee
commit fc0480ea2c
9340 changed files with 236665 additions and 221827 deletions

View File

@@ -0,0 +1,92 @@
//
// YMMineAccountView.m
// YUMI
//
// Created by YUMI on 2022/7/22.
//
#import "XPMineAccountView.h"
#import <Masonry/Masonry.h>
#import "DJDKMIMOMColor.h"
@interface XPMineAccountView ()
@property (nonatomic, strong) UIImageView *bgImageView;
@property (nonatomic, strong) UILabel *coinLabel;
@property (nonatomic, strong) UILabel *descLabel;
@end
@implementation XPMineAccountView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.bgImageView];
[self addSubview:self.coinLabel];
[self addSubview:self.descLabel];
}
- (void)initSubViewConstraints {
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(0);
}];
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(13);
make.left.mas_equalTo(14);
make.right.mas_equalTo(0);
make.height.mas_equalTo(24);
}];
[self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.coinLabel);
make.top.mas_equalTo(self.coinLabel.mas_bottom);
make.height.mas_equalTo(14);
}];
}
- (void)setDiamonds:(NSString *)diamonds {
self.coinLabel.text = diamonds;
}
#pragma mark - Getters And Setters
- (UIImageView *)bgImageView {
if (!_bgImageView) {
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_head_account_bg"]];
_bgImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _bgImageView;
}
- (UILabel *)descLabel {
if (!_descLabel) {
_descLabel = [[UILabel alloc] init];
_descLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
_descLabel.textColor = UIColorRGBAlpha(0x000000, 0.3);
_descLabel.text = YMLocalizedString(@"XPMineAccountView0");
}
return _descLabel;
}
- (UILabel *)coinLabel {
if (!_coinLabel) {
_coinLabel = [[UILabel alloc] init];
_coinLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightBold];
_coinLabel.textColor = [DJDKMIMOMColor mainTextColor];
}
return _coinLabel;
}
@end