Skip to content

UIKit: Fix switch presented child double dismiss#332

Open
areschoug wants to merge 2 commits intopointfreeco:mainfrom
areschoug:uikit-change-presented-in-presented-bug
Open

UIKit: Fix switch presented child double dismiss#332
areschoug wants to merge 2 commits intopointfreeco:mainfrom
areschoug:uikit-change-presented-in-presented-bug

Conversation

@areschoug
Copy link
Copy Markdown

Sometimes when changing the presented view controller from one to another, the parent also gets dismissed.

The fix is to check if the presentedViewController is already being dismissed. If it is, wait for it to finish dismissing before presenting the new one. I'm piggybacking on _UIKitNavigation_onDismiss to get a callback when the view controller is dismissed. Not sure if that is the best way to do it. We've used this in our project and it seems to work.

@juliensagot
Copy link
Copy Markdown
Contributor

juliensagot commented Mar 21, 2026

I’m experiencing the same issue in my project, and this fix resolves it on my end as well.
Thanks for the fix, @areschoug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants