Skip to content

Commit

Permalink
Fixed Tencent#619 修复 QMUINavigationController 刚启动时,NavBarTintColor 无效…
Browse files Browse the repository at this point in the history
…导致颜色错误的 bug
  • Loading branch information
MoLice committed Jun 12, 2019
1 parent cd406c7 commit bab11c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions QMUIKit/QMUIMainFrame/QMUINavigationController.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ @implementation QMUINavigationController

#pragma mark - 生命周期函数 && 基类方法重写

- (instancetype)initWithRootViewController:(UIViewController *)rootViewController {
if (self = [super initWithRootViewController:rootViewController]) {
if (@available(iOS 13.0, *)) {
// -[UINavigationController initWithRootViewController:] 在 iOS 13 以下的版本内部会调用 [self initWithNibName:bundle] 而在 iOS 13 上则是直接调用 [super initWithNibName:bundle] 所以这里需要手动调用一次 [self didInitialize]
[self didInitialize];
}
}
return self;
}

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
[self didInitialize];
Expand Down

0 comments on commit bab11c1

Please sign in to comment.