Files
yinmeng-ios/xplan-ios/Main/Mine/View/Setting/XPMineAboutUsViewController.m
chenguilong ba27cf195d 魔力换皮
2022-09-27 10:13:21 +08:00

88 lines
2.2 KiB
Objective-C

//
// XPMineAboutUsViewController.m
// xplan-ios
//
// Created by 冯硕 on 2021/9/17.
//
#import "XPMineAboutUsViewController.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "YYUtility.h"
#import "XPMacro.h"
@interface XPMineAboutUsViewController ()
@property (nonatomic, strong) UIImageView *iconImageView;//图标
@property (strong, nonatomic) UILabel *versionLabel;//版本
@property (strong , nonatomic) UILabel *nameLabel;
@end
@implementation XPMineAboutUsViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [NSString stringWithFormat:@"关于%@",AppName];
[self initSubViews];
[self makeConstriants];
}
- (void)initSubViews {
[self.view addSubview:self.versionLabel];
[self.view addSubview:self.iconImageView];
[self.view addSubview:self.nameLabel];
}
- (void)makeConstriants {
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view);
make.top.mas_equalTo(kNavigationHeight+60);
}];
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view);
make.top.mas_equalTo(self.iconImageView.mas_bottom).offset(5);
}];
[self.versionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(5);
make.centerX.mas_equalTo(self.view);
}];
}
#pragma mark - Getter && Setter
- (UIImageView *)iconImageView {
if (!_iconImageView) {
_iconImageView = [[UIImageView alloc] init];
_iconImageView.image = [UIImage imageNamed:@"ming_setting_about_us"];
_iconImageView.layer.cornerRadius = 12;
_iconImageView.layer.masksToBounds = YES;
}
return _iconImageView;
}
- (UILabel *)versionLabel {
if (!_versionLabel) {
_versionLabel = [[UILabel alloc] init];
_versionLabel.font = [UIFont systemFontOfSize:12];
_versionLabel.textColor = [ThemeColor mainTextColor];
_versionLabel.text = [NSString stringWithFormat:@"V%@",[YYUtility appVersion]];
}
return _versionLabel;
}
- (UILabel *)nameLabel {
if (!_nameLabel) {
_nameLabel = [[UILabel alloc] init];
_nameLabel.text = AppName;
_nameLabel.textColor = [ThemeColor secondTextColor];
_nameLabel.font = [UIFont systemFontOfSize:17];
}
return _nameLabel;
}
@end