Skip to content

Commit

Permalink
fix: use clearColor instead of systemBackgroundColor for visionOS (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
okwasniewski authored Feb 29, 2024
1 parent 2a1d10d commit 9e235fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ - (UIView *)viewWithModuleName:(NSString *)moduleName initialProperties:(NSDicti
sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact];

rootView = (RCTRootView *)surfaceHostingProxyRootView;
#if TARGET_OS_VISION
rootView.backgroundColor = [UIColor clearColor];
#else
rootView.backgroundColor = [UIColor systemBackgroundColor];
#endif
[self customizeRootView:(RCTRootView *)rootView];
return rootView;
}
Expand Down

0 comments on commit 9e235fd

Please sign in to comment.