Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow interactive dismissal of VCs that need custom first responder handling #2536

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Amzd
Copy link
Collaborator

@Amzd Amzd commented Jan 19, 2025

Some View Controllers don't give back the first responder correctly (eg when you use the search bar in UIImagePickerController). To combat this we previously wrapped those in a custom view controller that just gave back the responders manually. That sadly had the side effect of disabling interactive dismissal (swipe down to dismiss).

This PR fixes the interactive dismiss by doing away with the custom view controller wrapper and instead swizzling the methods.

Swizzling is a bit controversial but it is used by Firebase which is in many apps, and the associated objects usage is already in our app because SDWebImage uses it too.

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.

1 participant