123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- //
- // SPSBAboutViewController.m
- // 我的社保
- //
- // Created by shanp on 2021/5/13.
- //
- #import "SPSBAboutViewController.h"
- #import "SPSBUIGeneralHeader.h"
- #import "SPSBExplainViewController.h"
- @interface SPSBAboutViewController ()
- @end
- @implementation SPSBAboutViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self setupUI];
- }
- #pragma mark - Action
- - (void)introductionAction {
- SPSBExplainViewController *vc = SPSBExplainViewController.new;
- vc.spsb_explainType = SPSBExplainAboutApp;
- vc.title = [NSString stringWithFormat:@"%@简介", SPSBAppName];
- [self.navigationController pushViewController:vc animated:true];
- }
- - (void)gradeAction {
- jxh_openUrl([NSURL URLWithString:SPSBUrlToAppStoreComment], ^(BOOL success) {
- });
- }
- #pragma mark - Network Action
- #pragma mark - UI
- - (void)setupUI {
- self.title = [NSString stringWithFormat:@"关于%@", SPSBAppName];
- self.view.backgroundColor = spsb_F5F5F5_color();
- [self createView];
- }
- - (void)createView {
- UIView *iconView = [[UIView alloc] init];
- iconView.backgroundColor = spsb_FFFFFF_color(1.f);
- [self.view addSubview:iconView];
- [iconView makeConstraints:^(JXHConstraintMaker *make) {
- make.top.equalTo(self.view.safetop);
- make.leading.and.trailing.equalTo(0);
- make.height.equalTo(200);
- }];
-
- UIImageView *logoImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:SPSBLogo]];
- [logoImageView setLayerCornerRadius:16 clipToBounds:true];
- [logoImageView setLayerBorderWidth:jxh_onePixe() borderColor:spsb_E7E6EB_color()];
- [iconView addSubview:logoImageView];
- [logoImageView makeConstraints:^(JXHConstraintMaker *make) {
- make.top.equalTo(40);
- make.centerX.equalTo(iconView);
- }];
-
- UILabel *version = [UILabel convenienceWithFont:spsb_font(13) text:[NSString stringWithFormat:@"版本号 %@", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]] textColor:spsb_999999_color() textAlignment:NSTextAlignmentCenter];
- [iconView addSubview:version];
- [version makeConstraints:^(JXHConstraintMaker *make) {
- make.top.equalTo(logoImageView.bottom).offset(15);
- make.centerX.equalTo(iconView);
- }];
-
- UIButton *introductionButton = [UIButton convenienceWithTarget:self action:@selector(introductionAction)];
- introductionButton.backgroundColor = spsb_FFFFFF_color(1.f);
- [self.view addSubview:introductionButton];
- [introductionButton makeConstraints:^(JXHConstraintMaker *make) {
- make.top.equalTo(iconView.bottom).offset(12);
- make.leading.and.trailing.equalTo(0);
- make.height.equalTo(50);
- }];
-
- UILabel *titleLabel = [UILabel convenienceWithFont:spsb_font(16) text:[NSString stringWithFormat:@"%@简介", SPSBAppName] textColor:spsb_333333_color()];
- [introductionButton addSubview:titleLabel];
- [titleLabel makeConstraints:^(JXHConstraintMaker *make) {
- make.leading.equalTo(15);
- make.centerY.equalTo(introductionButton);
- }];
-
- UIImageView *arrow = [[UIImageView alloc] initWithImage:jxh_getImage(list_arrow)];
- [introductionButton addSubview:arrow];
- [arrow makeConstraints:^(JXHConstraintMaker *make) {
- make.trailing.equalTo(-15);
- make.centerY.equalTo(introductionButton);
- }];
-
- UIButton *gradeButton = [UIButton convenienceWithTarget:self action:@selector(gradeAction)];
- gradeButton.backgroundColor = spsb_FFFFFF_color(1.f);
- [self.view addSubview:gradeButton];
- [gradeButton makeConstraints:^(JXHConstraintMaker *make) {
- make.top.equalTo(introductionButton.bottom);
- make.leading.and.trailing.equalTo(0);
- make.height.equalTo(50);
- }];
-
- titleLabel = [UILabel convenienceWithFont:spsb_font(16) text:@"喜欢我们,打分鼓励" textColor:spsb_333333_color()];
- [gradeButton addSubview:titleLabel];
- [titleLabel makeConstraints:^(JXHConstraintMaker *make) {
- make.leading.equalTo(15);
- make.centerY.equalTo(gradeButton);
- }];
-
- arrow = [[UIImageView alloc] initWithImage:jxh_getImage(list_arrow)];
- [gradeButton addSubview:arrow];
- [arrow makeConstraints:^(JXHConstraintMaker *make) {
- make.trailing.equalTo(-15);
- make.centerY.equalTo(gradeButton);
- }];
-
- [gradeButton createLineWithLocation:JXHLineLocationTop headOffset:15 footOffset:0];
-
- UIImageView *footer = [[UIImageView alloc] initWithImage:jxh_getImage(footer)];
- [self.view addSubview:footer];
- [footer makeConstraints:^(JXHConstraintMaker *make) {
- make.bottom.equalTo(self.view.safebottom).offset(-40);
- make.centerX.equalTo(self.view);
- }];
- }
- @end
|