@@ -470,7 +470,7 @@ index 0000000000000000000000000000000000000000..7498c7aea5a853ad12ea607cce921d47
470470+
471471+ } // namespace rnscreens
472472diff --git a/ios/RNSScreen.mm b/ios/RNSScreen.mm
473- index 049fd22427b2bde17fd7ca59b8de65d0ee07b4b5..ac484f9033e16f61fb382ed266eac8c3d6fe8b74 100644
473+ index 049fd22427b2bde17fd7ca59b8de65d0ee07b4b5..a1597db71b69de1c2db87ddf9f825aa51850f2e7 100644
474474--- a/ios/RNSScreen.mm
475475+++ b/ios/RNSScreen.mm
476476@@ -1,4 +1,5 @@
@@ -479,7 +479,15 @@ index 049fd22427b2bde17fd7ca59b8de65d0ee07b4b5..ac484f9033e16f61fb382ed266eac8c3
479479
480480 #import "RNSModalScreen.h"
481481 #import "RNSScreen.h"
482- @@ -1226,9 +1227,82 @@ - (BOOL)hasHeaderConfig
482+ @@ -10,6 +11,7 @@
483+ #import <React/RCTFabricComponentsPlugins.h>
484+ #import <React/RCTRootComponentView.h>
485+ #import <React/RCTScrollViewComponentView.h>
486+ + #import <React/RCTStatusBarAppearance.h>
487+ #import <React/RCTSurfaceTouchHandler.h>
488+ #import <react/renderer/components/rnscreens/EventEmitters.h>
489+ #import <react/renderer/components/rnscreens/Props.h>
490+ @@ -1226,9 +1228,82 @@ - (BOOL)hasHeaderConfig
483491 return _config != nil;
484492 }
485493
@@ -562,7 +570,39 @@ index 049fd22427b2bde17fd7ca59b8de65d0ee07b4b5..ac484f9033e16f61fb382ed266eac8c3
562570 }
563571
564572 + (react::ComponentDescriptorProvider)componentDescriptorProvider
565- @@ -2110,6 +2184,12 @@ - (RNSOrientation)evaluateOrientation
573+ @@ -1955,7 +2030,8 @@ - (UIViewController *)childViewControllerForStatusBarHidden
574+
575+ - (BOOL)prefersStatusBarHidden
576+ {
577+ - return self.screenView.statusBarHidden;
578+ + // A screen without the prop defers to the status bar set from JS.
579+ + return self.screenView.hasStatusBarHiddenSet ? self.screenView.statusBarHidden : RCTStatusBarAppearance.hidden;
580+ }
581+
582+ - (UIViewController *)childViewControllerForStatusBarStyle
583+ @@ -1966,7 +2042,10 @@ - (UIViewController *)childViewControllerForStatusBarStyle
584+
585+ - (UIStatusBarStyle)preferredStatusBarStyle
586+ {
587+ - return [RNSScreenWindowTraits statusBarStyleForRNSStatusBarStyle:self.screenView.statusBarStyle];
588+ + // A screen without the prop defers to the status bar set from JS.
589+ + return self.screenView.hasStatusBarStyleSet
590+ + ? [RNSScreenWindowTraits statusBarStyleForRNSStatusBarStyle:self.screenView.statusBarStyle]
591+ + : RCTStatusBarAppearance.style;
592+ }
593+
594+ - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation
595+ @@ -1976,7 +2055,8 @@ - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation
596+ if ([vc isKindOfClass:[RNSScreen class]]) {
597+ return ((RNSScreen *)vc).screenView.statusBarAnimation;
598+ }
599+ - return UIStatusBarAnimationFade;
600+ + // No screen sets the animation, so use the one set from JS.
601+ + return RCTStatusBarAppearance.updateAnimation;
602+ }
603+
604+ - (UIInterfaceOrientationMask)supportedInterfaceOrientations
605+ @@ -2110,6 +2190,12 @@ - (RNSOrientation)evaluateOrientation
566606
567607 - (void)addSnapshotToView
568608 {
@@ -575,7 +615,7 @@ index 049fd22427b2bde17fd7ca59b8de65d0ee07b4b5..ac484f9033e16f61fb382ed266eac8c3
575615 // if we dismissed the view natively, it will already be detached from view hierarchy
576616 if (self.view.window == nil) {
577617 return;
578- @@ -2123,6 +2203 ,13 @@ - (void)addSnapshotToView
618+ @@ -2123,6 +2209 ,13 @@ - (void)addSnapshotToView
579619 snapshot.frame = self.view.bounds;
580620 // fill the whole screen view with the snapshot
581621 snapshot.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
0 commit comments