From 5b7ddec1dad927e71dc31115111dec5d7e165449 Mon Sep 17 00:00:00 2001 From: yogevbd Date: Sun, 1 Dec 2019 14:42:09 +0200 Subject: [PATCH] Fix topBar.noBorder option --- lib/ios/RNNStackPresenter.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ios/RNNStackPresenter.m b/lib/ios/RNNStackPresenter.m index 227a36234c9..4bf3203c7aa 100644 --- a/lib/ios/RNNStackPresenter.m +++ b/lib/ios/RNNStackPresenter.m @@ -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]]; @@ -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]]; @@ -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]; } @@ -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]; }