Skip to content

Commit 7f0d86d

Browse files
committed
fix: use clearColor instead of systemBackgroundColor for visionOS (#125)
1 parent 434d279 commit 7f0d86d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,11 @@ - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge
186186
#endif
187187
UIView *rootView = RCTAppSetupDefaultRootView(bridge, moduleName, initProps, enableFabric);
188188

189+
#if TARGET_OS_VISION
190+
rootView.backgroundColor = [UIColor clearColor];
191+
#else
189192
rootView.backgroundColor = [UIColor systemBackgroundColor];
190-
193+
#endif
191194
return rootView;
192195
}
193196

0 commit comments

Comments
 (0)