diff --git a/lib/ios/RNNBasePresenter.m b/lib/ios/RNNBasePresenter.m index 3bd4da426cc..a4bf1229492 100644 --- a/lib/ios/RNNBasePresenter.m +++ b/lib/ios/RNNBasePresenter.m @@ -72,6 +72,10 @@ - (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigat if (options.window.backgroundColor.hasValue) { UIApplication.sharedApplication.delegate.window.backgroundColor = withDefault.window.backgroundColor.get; } + + if (options.statusBar.visible.hasValue) { + [self.boundViewController setNeedsStatusBarAppearanceUpdate]; + } } - (void)renderComponents:(RNNNavigationOptions *)options perform:(RNNReactViewReadyCompletionBlock)readyBlock { diff --git a/playground/ios/NavigationTests/RNNBasePresenterTest.m b/playground/ios/NavigationTests/RNNBasePresenterTest.m index 67f83c1a423..b238f0df65d 100644 --- a/playground/ios/NavigationTests/RNNBasePresenterTest.m +++ b/playground/ios/NavigationTests/RNNBasePresenterTest.m @@ -123,4 +123,13 @@ - (void)testHidesBottomBarWhenPushed_resolveChildHidesBarBeforeParent { XCTAssertTrue(_boundViewController.hidesBottomBarWhenPushed); } +- (void)testMergeOptions_updatesStatusBarVisibility { + RNNNavigationOptions* mergeOptions = [RNNNavigationOptions emptyOptions]; + mergeOptions.statusBar.visible = [Bool withValue:@(0)]; + + [[self.mockBoundViewController expect] setNeedsStatusBarAppearanceUpdate]; + [self.uut mergeOptions:mergeOptions resolvedOptions:nil]; + [self.mockBoundViewController verify]; +} + @end