@@ -144,6 +144,17 @@ - (void)initCommonProps
144144#endif // RCT_NEW_ARCH_ENABLED
145145}
146146
147+ + (RNSViewInteractionManager *)viewInteractionManagerInstance
148+ {
149+ static RNSViewInteractionManager *manager = nil ;
150+ static dispatch_once_t onceToken;
151+ dispatch_once (&onceToken, ^{
152+ manager = [[RNSViewInteractionManager alloc ] init ];
153+ });
154+
155+ return manager;
156+ }
157+
147158- (BOOL )getFullScreenSwipeShadowEnabled
148159{
149160 if (@available (iOS 26 , *)) {
@@ -795,15 +806,15 @@ - (void)willMoveToWindow:(UIWindow *)newWindow
795806 // Furthermore, a stack put inside a modal will exist in an entirely different hierarchy
796807 // To be sure, we block interactions on the whole window.
797808 // Note that newWindows is nil when moving from instead of moving to, and Obj-C handles nil correctly
798- newWindow. userInteractionEnabled = false ;
809+ [RNSScreenView.viewInteractionManagerInstance disableInteractionsForSubtreeWith: self ] ;
799810 }
800811}
801812
802813- (void )presentationControllerWillDismiss : (UIPresentationController *)presentationController
803814{
804815 if (@available (iOS 26 , *)) {
805816 // Disable interactions to disallow multiple modals dismissed at once; see willMoveToWindow
806- presentationController. containerView . window . userInteractionEnabled = false ;
817+ [RNSScreenView.viewInteractionManagerInstance disableInteractionsForSubtreeWith: self ] ;
807818 }
808819
809820#if !RCT_NEW_ARCH_ENABLED
@@ -834,7 +845,7 @@ - (void)presentationControllerDidAttemptToDismiss:(UIPresentationController *)pr
834845{
835846 if (@available (iOS 26 , *)) {
836847 // Reenable interactions; see presentationControllerWillDismiss
837- presentationController. containerView . window . userInteractionEnabled = true ;
848+ [RNSScreenView.viewInteractionManagerInstance enableInteractionsForLastSubtree ] ;
838849 }
839850
840851 // NOTE(kkafar): We should consider depracating the use of gesture cancel here & align
@@ -850,7 +861,7 @@ - (void)presentationControllerDidDismiss:(UIPresentationController *)presentatio
850861 if (@available (iOS 26 , *)) {
851862 // Reenable interactions; see presentationControllerWillDismiss
852863 // Dismissed screen doesn't hold a reference to window, but presentingViewController.view does
853- presentationController. presentingViewController . view . window . userInteractionEnabled = true ;
864+ [RNSScreenView.viewInteractionManagerInstance enableInteractionsForLastSubtree ] ;
854865 }
855866
856867 if ([_reactSuperview respondsToSelector: @selector (presentationControllerDidDismiss: )]) {
@@ -1654,7 +1665,7 @@ - (void)viewDidAppear:(BOOL)animated
16541665{
16551666 if (@available (iOS 26 , *)) {
16561667 // Reenable interactions, see willMoveToWindow
1657- self. view . window . userInteractionEnabled = true ;
1668+ [RNSScreenView.viewInteractionManagerInstance enableInteractionsForLastSubtree ] ;
16581669 }
16591670 [super viewDidAppear: animated];
16601671 if (!_isSwiping || _shouldNotify) {
@@ -1696,6 +1707,10 @@ - (void)viewDidDisappear:(BOOL)animated
16961707#else
16971708 [self traverseForScrollView: self .screenView];
16981709#endif
1710+ if (@available (iOS 26 , *)) {
1711+ // Reenable interactions, see willMoveToWindow
1712+ [RNSScreenView.viewInteractionManagerInstance enableInteractionsForLastSubtree ];
1713+ }
16991714}
17001715
17011716- (void )viewDidLayoutSubviews
0 commit comments