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.
74 lines
1.8 KiB
74 lines
1.8 KiB
4 years ago
|
//
|
||
|
// TFAnnouncementController.m
|
||
|
// TFReader
|
||
|
//
|
||
|
// Created by 谢腾飞 on 2020/12/14.
|
||
|
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "TFAnnouncementController.h"
|
||
|
|
||
|
@interface TFAnnouncementController ()
|
||
|
|
||
|
@end
|
||
|
|
||
|
@implementation TFAnnouncementController
|
||
|
|
||
|
- (void)viewDidLoad
|
||
|
{
|
||
|
[super viewDidLoad];
|
||
|
|
||
|
[self initialize];
|
||
|
[self createSubviews];
|
||
|
|
||
|
}
|
||
|
- (void)initialize
|
||
|
{
|
||
|
[self setNavigationBarTitle:self.titleText.length > 0 ? self.titleText:TFLocalizedString(@"公告栏")];
|
||
|
self.view.backgroundColor = kWhiteColor;
|
||
|
}
|
||
|
|
||
|
- (void)viewWillAppear:(BOOL)animated
|
||
|
{
|
||
|
[super viewWillAppear:animated];
|
||
|
|
||
|
[[NSNotificationCenter defaultCenter] postNotificationName:Notification_Hidden_Tabbar object:nil];
|
||
|
}
|
||
|
|
||
|
- (void)viewDidDisappear:(BOOL)animated
|
||
|
{
|
||
|
[super viewDidDisappear:animated];
|
||
|
|
||
|
[[NSNotificationCenter defaultCenter] postNotificationName:Notification_Show_Tabbar object:@"animation"];
|
||
|
}
|
||
|
|
||
|
- (void)viewDidAppear:(BOOL)animated
|
||
|
{
|
||
|
[super viewDidAppear:animated];
|
||
|
|
||
|
[self setStatusBarDefaultStyle];
|
||
|
}
|
||
|
|
||
|
- (void)createSubviews
|
||
|
{
|
||
|
YYTextView *textView = [[YYTextView alloc] init];
|
||
|
textView.editable = NO;
|
||
|
textView.textColor = kBlackColor;
|
||
|
textView.font = kMainFont;
|
||
|
[self.view addSubview:textView];
|
||
|
|
||
|
NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString: self.contentText.length > 0 ? self.contentText:@""];
|
||
|
text.lineSpacing = 5;
|
||
|
text.font = kMainFont;
|
||
|
textView.attributedText = text;
|
||
|
|
||
|
[textView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||
|
make.left.mas_equalTo(kHalfMargin);
|
||
|
make.top.mas_equalTo(PUB_NAVBAR_HEIGHT + kHalfMargin);
|
||
|
make.width.mas_equalTo(SCREEN_WIDTH - kMargin);
|
||
|
make.height.mas_equalTo(SCREEN_HEIGHT - PUB_NAVBAR_HEIGHT - kHalfMargin);
|
||
|
}];
|
||
|
}
|
||
|
|
||
|
@end
|