From e3f3d32fe64fb6ac9055bc1c304caae01a5032e5 Mon Sep 17 00:00:00 2001 From: reuk Date: Wed, 19 Nov 2025 14:09:49 +0000 Subject: [PATCH] UIViewComponentPeer: Remove rootViewController from old window before adding it to new window This fixes an issue where the view would disappear and the window would become black when the window scene changed, e.g. because screen sharing was started. --- modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm index b8ec8c6b08..2b4f789f2e 100644 --- a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +++ b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm @@ -577,6 +577,7 @@ private: if (@available (iOS 13, *)) window.windowScene = nil; + window.rootViewController = nil; [window release]; window = nil; }