123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // RQAboutViewController.m
- // jiaPei
- //
- // Created by 张嵘 on 2022/9/16.
- // Copyright © 2022 JCZ. All rights reserved.
- //
- #import "RQAboutViewController.h"
- @interface RQAboutViewController ()
- /// viewModel
- @property (nonatomic, readonly, strong) RQAboutViewModel *viewModel;
- @end
- @implementation RQAboutViewController
- @dynamic viewModel;
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- /// 设置子控件
- [self setupSubViews];
- }
- #pragma mark - Override
- - (UIEdgeInsets)contentInset{
- return UIEdgeInsetsMake(RQ_APPLICATION_NAV_BAR_HEIGHT + RQ_APPLICATION_STATUS_BAR_HEIGHT, 0, 0, 0);
- }
- #pragma mark - 设置子控件
- - (void)setupSubViews{
-
- @weakify(self);
-
- /// 设置header
- self.tableView.tableHeaderView = [RQAboutUsHeaderView rq_viewFromXib];
- self.tableView.tableHeaderView.rq_height = 250;
-
- /// 添加富文本
- YYLabel *copyrightLabel = [[YYLabel alloc] init];
- copyrightLabel.numberOfLines = 0;
- copyrightLabel.textAlignment = NSTextAlignmentCenter;
- NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:@"极速驾培 版权所有\nCopyright©2022 All Rights Reserved"];
- attributedText.yy_font = RQRegularFont_14;
- attributedText.yy_color = RQ_MAIN_TEXT_COLOR_2;
- attributedText.yy_alignment = NSTextAlignmentCenter;
- copyrightLabel.attributedText = attributedText.copy;
- /// 设置高度
- YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(RQ_SCREEN_WIDTH, MAXFLOAT)];
- YYTextLayout *layout = [YYTextLayout layoutWithContainer:container text:attributedText];
-
- copyrightLabel.rq_y = RQ_SCREEN_HEIGHT - layout.textBoundingSize.height - RQ_APPLICATION_NAV_BAR_HEIGHT - RQ_APPLICATION_STATUS_BAR_HEIGHT - 13;
- copyrightLabel.rq_width = RQ_SCREEN_WIDTH ;
- copyrightLabel.rq_height = layout.textBoundingSize.height;
- [self.tableView addSubview:copyrightLabel];
- }
- @end
|