diff --git a/ios/RNSFullWindowOverlay.mm b/ios/RNSFullWindowOverlay.mm index 74f1804239..ca1278a384 100644 --- a/ios/RNSFullWindowOverlay.mm +++ b/ios/RNSFullWindowOverlay.mm @@ -123,7 +123,7 @@ - (RNSFullWindowOverlayContainer *)container - (void)show { - UIWindow *window = RCTSharedApplication().delegate.window; + UIWindow *window = RCTKeyWindow(); [window addSubview:_container]; } @@ -156,7 +156,7 @@ - (void)didMoveToSuperview // so when the component gets recycled we need to add it back. - (void)maybeShow { - UIWindow *window = RCTSharedApplication().delegate.window; + UIWindow *window = RCTKeyWindow(); if (![[window subviews] containsObject:self]) { [window addSubview:_container]; }