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 6, 2024
1 parent 374d25c commit 577ee01
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 @@ -76,7 +76,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 577ee01

Please sign in to comment.