Skip to content

Commit 9e235fd

Browse files
authored
fix: use clearColor instead of systemBackgroundColor for visionOS (#125)
1 parent 2a1d10d commit 9e235fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ - (UIView *)viewWithModuleName:(NSString *)moduleName initialProperties:(NSDicti
113113
sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact];
114114

115115
rootView = (RCTRootView *)surfaceHostingProxyRootView;
116+
#if TARGET_OS_VISION
117+
rootView.backgroundColor = [UIColor clearColor];
118+
#else
116119
rootView.backgroundColor = [UIColor systemBackgroundColor];
120+
#endif
117121
[self customizeRootView:(RCTRootView *)rootView];
118122
return rootView;
119123
}

0 commit comments

Comments
 (0)