|
@@ -486,23 +486,25 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
|
486
|
486
|
}
|
487
|
487
|
|
488
|
488
|
NSString *navBarCustomView = self.navigatorStyle[@"navBarCustomView"];
|
489
|
|
- if (navBarCustomView && !self.navigationItem.titleView) {
|
|
489
|
+ if (navBarCustomView && ![self.navigationItem.titleView isKindOfClass:[RCCCustomTitleView class]]) {
|
490
|
490
|
if ([self.view isKindOfClass:[RCTRootView class]]) {
|
491
|
491
|
|
492
|
492
|
RCTBridge *bridge = ((RCTRootView*)self.view).bridge;
|
493
|
|
- RCTRootView *reactView = [[RCTRootView alloc] initWithBridge:bridge moduleName:navBarCustomView initialProperties:nil];
|
|
493
|
+
|
|
494
|
+ NSDictionary *initialProps = self.navigatorStyle[@"navBarCustomViewInitialProps"];
|
|
495
|
+ RCTRootView *reactView = [[RCTRootView alloc] initWithBridge:bridge moduleName:navBarCustomView initialProperties:initialProps];
|
494
|
496
|
|
495
|
497
|
RCCCustomTitleView *titleView = [[RCCCustomTitleView alloc] initWithFrame:self.navigationController.navigationBar.bounds subView:reactView alignment:self.navigatorStyle[@"navBarComponentAlignment"]];
|
496
|
498
|
titleView.backgroundColor = [UIColor clearColor];
|
497
|
499
|
reactView.backgroundColor = [UIColor clearColor];
|
498
|
|
-
|
|
500
|
+
|
499
|
501
|
self.navigationItem.titleView = titleView;
|
500
|
502
|
|
501
|
503
|
self.navigationItem.titleView.backgroundColor = [UIColor clearColor];
|
502
|
504
|
self.navigationItem.titleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
|
503
|
505
|
self.navigationItem.titleView.clipsToBounds = YES;
|
504
|
506
|
}
|
505
|
|
- }
|
|
507
|
+ }
|
506
|
508
|
}
|
507
|
509
|
|
508
|
510
|
|