75 lines
1.7 KiB
Objective-C
75 lines
1.7 KiB
Objective-C
//
|
|
// 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;
|
|
|
|
@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];
|
|
}
|
|
|
|
- (void)initSubViewConstraints {
|
|
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.edges.mas_equalTo(0);
|
|
}];
|
|
|
|
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.bottom.mas_equalTo(-8);
|
|
make.leading.mas_equalTo(4);
|
|
make.trailing.mas_equalTo(-4);
|
|
make.height.mas_equalTo(18);
|
|
}];
|
|
}
|
|
|
|
- (void)setDiamonds:(NSString *)diamonds {
|
|
|
|
}
|
|
|
|
#pragma mark - Getters And Setters
|
|
- (UIImageView *)bgImageView {
|
|
if (!_bgImageView) {
|
|
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"me_bg_wallet"]];
|
|
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
|
}
|
|
return _bgImageView;
|
|
}
|
|
|
|
- (UILabel *)coinLabel {
|
|
if (!_coinLabel) {
|
|
_coinLabel = [[UILabel alloc] init];
|
|
_coinLabel.text = YMLocalizedString(@"XPIncomeRecordVC1");
|
|
_coinLabel.textAlignment = NSTextAlignmentCenter;
|
|
_coinLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
|
_coinLabel.textColor = UIColorFromRGB(0x78330A);
|
|
}
|
|
return _coinLabel;
|
|
}
|
|
|
|
@end
|