Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
coderZsq committed Sep 26, 2019
1 parent 4ea068f commit 17de986
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions SQManagement/SQManagement/Main/SQH1TitleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@
@interface SQH1TitleViewController ()
@property (nonatomic, weak) UILabel *titleLabel;
@property (nonatomic, weak) UIColor *defaultColor;
@property (nonatomic, assign, getter=isFirstAppear) BOOL firstAppear;
@end

@implementation SQH1TitleViewController

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.titleLabel = [self findNavigationBarContentViewTitleLabel];
self.defaultColor = self.titleLabel.textColor;
UILabel *titleLabel = [UILabel new];
titleLabel.font = self.titleLabel.font;
titleLabel.text = self.titleLabel.text;
titleLabel.textColor = [UIColor clearColor];
titleLabel.frame = self.titleLabel.frame;
self.navigationItem.titleView = titleLabel;
self.titleLabel = titleLabel;
if (!self.isFirstAppear) {
self.titleLabel = [self findNavigationBarContentViewTitleLabel];
self.defaultColor = self.titleLabel.textColor;
UILabel *titleLabel = [UILabel new];
titleLabel.font = self.titleLabel.font;
titleLabel.text = self.titleLabel.text;
titleLabel.textColor = [UIColor clearColor];
titleLabel.frame = self.titleLabel.frame;
self.navigationItem.titleView = titleLabel;
self.titleLabel = titleLabel;
self.firstAppear = YES;
}
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
Expand Down

0 comments on commit 17de986

Please sign in to comment.