#getRootViewController returns nil #30

Open
opened 2025-12-29 18:28:24 +01:00 by adam · 0 comments
Owner

Originally created by @b-raines on GitHub (Apr 11, 2016).

When looping through window.subviews the next responder object for the 2 subviews returned were both windows (instead of a UIViewController). Moved call to showPrompt() to a different area as a temporary solution.

Call to #userDidSignificantEvent was taking place upon dismissing an AVPlayerViewController which was presented modally over a UIPageViewController (that was embedded within a UINavigationController).

I didn't spend too much time diagnosing this, but my assumption is that the presented view controller had not been fully dismissed yet, causing the unexpected behavior... If I have time later, I'll try to dig in and determine if that was actually the cause.

Originally created by @b-raines on GitHub (Apr 11, 2016). When looping through `window.subviews` the next responder object for the 2 subviews returned were both windows (instead of a UIViewController). Moved call to `showPrompt()` to a different area as a temporary solution. Call to #userDidSignificantEvent was taking place upon dismissing an AVPlayerViewController which was presented modally over a UIPageViewController (that was embedded within a UINavigationController). I didn't spend too much time diagnosing this, but my assumption is that the presented view controller had not been fully dismissed yet, causing the unexpected behavior... If I have time later, I'll try to dig in and determine if that was actually the cause.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Armchair#30