Skip to content

Commit f984c3f

Browse files
committed
fix: use clearColor instead of systemBackgroundColor for visionOS (#125)
1 parent 4d486a5 commit f984c3f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge
8181
BOOL enableFabric = self.fabricEnabled;
8282
UIView *rootView = RCTAppSetupDefaultRootView(bridge, moduleName, initProps, enableFabric);
8383

84+
#if TARGET_OS_VISION
85+
rootView.backgroundColor = [UIColor clearColor];
86+
#else
8487
rootView.backgroundColor = [UIColor systemBackgroundColor];
88+
#endif
8589

8690
return rootView;
8791
}

0 commit comments

Comments
 (0)