File tree Expand file tree Collapse file tree
react-native/React/CoreModules Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010#import < React/RCTAlertController.h>
1111
12+ #if TARGET_OS_VISION
13+ @interface TransparentViewController : UIViewController
14+
15+ @end
16+
17+ @implementation TransparentViewController
18+
19+ - (UIContainerBackgroundStyle)preferredContainerBackgroundStyle {
20+ return UIContainerBackgroundStyleHidden;
21+ }
22+
23+ @end
24+ #endif
25+
1226@interface RCTAlertController ()
1327
1428@property (nonatomic , strong ) UIWindow *alertWindow;
@@ -23,7 +37,11 @@ - (UIWindow *)alertWindow
2337 _alertWindow = [[UIWindow alloc ] initWithWindowScene: RCTKeyWindow ().windowScene];
2438
2539 if (_alertWindow) {
40+ #if TARGET_OS_VISION
41+ _alertWindow.rootViewController = [TransparentViewController new ];
42+ #else
2643 _alertWindow.rootViewController = [UIViewController new ];
44+ #endif
2745 _alertWindow.windowLevel = UIWindowLevelAlert + 1 ;
2846 }
2947 }
You can’t perform that action at this time.
0 commit comments