Skip to content

Commit

Permalink
Fix topBar.noBorder option
Browse files Browse the repository at this point in the history
  • Loading branch information
yogevbd committed Dec 1, 2019
1 parent 919fa12 commit 5b7ddec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/ios/RNNStackPresenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ - (void)applyOptions:(RNNNavigationOptions *)options {
self.interactivePopGestureDelegate.originalDelegate = stack.interactivePopGestureRecognizer.delegate;
stack.interactivePopGestureRecognizer.delegate = self.interactivePopGestureDelegate;

[stack setTopBarBackgroundColor:[withDefault.topBar.background.color getWithDefaultValue:nil]];
[stack setInteractivePopGestureEnabled:[withDefault.popGesture getWithDefaultValue:YES]];
[stack setRootBackgroundImage:[withDefault.rootBackgroundImage getWithDefaultValue:nil]];
[stack setNavigationBarTestId:[withDefault.topBar.testID getWithDefaultValue:nil]];
Expand All @@ -39,7 +40,6 @@ - (void)applyOptions:(RNNNavigationOptions *)options {
[stack setNavigationBarTranslucent:[withDefault.topBar.background.translucent getWithDefaultValue:NO]];
[stack setNavigationBarClipsToBounds:[withDefault.topBar.background.clipToBounds getWithDefaultValue:NO]];
[stack setNavigationBarBlur:[withDefault.topBar.background.blur getWithDefaultValue:NO]];
[stack setTopBarBackgroundColor:[withDefault.topBar.background.color getWithDefaultValue:nil]];
[stack setNavigationBarLargeTitleVisible:[withDefault.topBar.largeTitle.visible getWithDefaultValue:NO]];
[stack setNavigationBarLargeTitleFontFamily:[withDefault.topBar.largeTitle.fontFamily getWithDefaultValue:nil] fontSize:[withDefault.topBar.largeTitle.fontSize getWithDefaultValue:nil] fontWeight:[withDefault.topBar.largeTitle.fontWeight getWithDefaultValue:nil] color:[withDefault.topBar.largeTitle.color getWithDefaultValue:nil]];
[stack setNavigationBarFontFamily:[withDefault.topBar.title.fontFamily getWithDefaultValue:nil] fontSize:[withDefault.topBar.title.fontSize getWithDefaultValue:nil] fontWeight:[withDefault.topBar.title.fontWeight getWithDefaultValue:nil] color:[withDefault.topBar.title.color getWithDefaultValue:nil]];
Expand Down Expand Up @@ -67,6 +67,10 @@ - (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigat
[super mergeOptions:options resolvedOptions:resolvedOptions];
RNNStackController* stack = self.boundViewController;

if (options.topBar.background.color.hasValue) {
[stack setTopBarBackgroundColor:options.topBar.background.color.get];
}

if (options.popGesture.hasValue) {
[stack setInteractivePopGestureEnabled:options.popGesture.get];
}
Expand Down Expand Up @@ -107,10 +111,6 @@ - (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigat
[stack setNavigationBarBlur:[options.topBar.background.blur get]];
}

if (options.topBar.background.color.hasValue) {
[stack setTopBarBackgroundColor:options.topBar.background.color.get];
}

if (options.topBar.largeTitle.visible.hasValue) {
[stack setNavigationBarLargeTitleVisible:options.topBar.largeTitle.visible.get];
}
Expand Down

0 comments on commit 5b7ddec

Please sign in to comment.