You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.5 KiB
59 lines
1.5 KiB
4 years ago
|
//
|
||
|
// TFGuideViewController.m
|
||
|
// WXReader
|
||
|
//
|
||
|
// Created by 谢腾飞 on 2020/12/3.
|
||
|
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "TFGuideViewController.h"
|
||
|
#import "YYTextView.h"
|
||
|
|
||
|
@interface TFGuideViewController ()
|
||
|
|
||
|
@property (nonatomic ,strong) YYTextView *rulesView;
|
||
|
|
||
|
@end
|
||
|
|
||
|
@implementation TFGuideViewController
|
||
|
|
||
|
- (void)viewDidLoad
|
||
|
{
|
||
|
[super viewDidLoad];
|
||
|
|
||
|
[self initialize];
|
||
|
[self createSubviews];
|
||
|
}
|
||
|
|
||
|
- (void)initialize
|
||
|
{
|
||
|
[self setNavigationBarTitle:TFLocalizedString(@"签到规则")];
|
||
|
self.view.backgroundColor = [UIColor whiteColor];
|
||
|
}
|
||
|
|
||
|
- (void)createSubviews
|
||
|
{
|
||
|
self.rulesView = [[YYTextView alloc] init];
|
||
|
self.rulesView.backgroundColor = kWhiteColor;
|
||
|
self.rulesView.editable = NO;
|
||
|
self.rulesView.selectable = NO;
|
||
|
self.rulesView.textColor = KGrayTextMiddleColor;
|
||
|
self.rulesView.font = kMainFont;
|
||
|
[self.view addSubview:self.rulesView];
|
||
|
|
||
|
[self.rulesView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||
|
make.top.mas_equalTo(PUB_NAVBAR_HEIGHT + kHalfMargin);
|
||
|
make.left.mas_equalTo(kHalfMargin);
|
||
|
make.width.mas_equalTo(SCREEN_WIDTH - kMargin);
|
||
|
make.height.mas_equalTo(SCREEN_HEIGHT - PUB_NAVBAR_HEIGHT);
|
||
|
}];
|
||
|
|
||
|
NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString:self.guideString ? : @""];
|
||
|
text.lineSpacing = 8;
|
||
|
text.font = kMainFont;
|
||
|
text.color = KGrayTextMiddleColor;
|
||
|
self.rulesView.attributedText = text;
|
||
|
}
|
||
|
|
||
|
@end
|