Skip to content

Commit 2b54ad9

Browse files
committed
fix: use clearColor instead of systemBackgroundColor for visionOS (#125)
1 parent e05b771 commit 2b54ad9

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
@@ -89,7 +89,11 @@ - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge
8989
BOOL enableFabric = self.fabricEnabled;
9090
UIView *rootView = RCTAppSetupDefaultRootView(bridge, moduleName, initProps, enableFabric);
9191

92+
#if TARGET_OS_VISION
93+
rootView.backgroundColor = [UIColor clearColor];
94+
#else
9295
rootView.backgroundColor = [UIColor systemBackgroundColor];
96+
#endif
9397

9498
return rootView;
9599
}

0 commit comments

Comments
 (0)