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 committed Mar 18, 2024
1 parent 4d486a5 commit f984c3f
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 @@ -81,7 +81,11 @@ - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge
BOOL enableFabric = self.fabricEnabled;
UIView *rootView = RCTAppSetupDefaultRootView(bridge, moduleName, initProps, enableFabric);

#if TARGET_OS_VISION
rootView.backgroundColor = [UIColor clearColor];
#else
rootView.backgroundColor = [UIColor systemBackgroundColor];
#endif

return rootView;
}
Expand Down

0 comments on commit f984c3f

Please sign in to comment.