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

Add .introspectSearchController #129

Merged
merged 16 commits into from
Feb 12, 2023
Merged

Conversation

iansampson
Copy link
Contributor

With iOS 15, SwiftUI adds a .searchable modifier to View, which configures a UISearchController within the enclosing UINavigationView. This pull request adds a method for introspecting that UISearchController. Introspection makes it possible to use search features that are not currently available in SwiftUI, such as scope bar buttons.

The pull request supports introspecting UISearchController in iOS, but doesn’t yet cover comparable elements in macOS, tvOS, or watchOS (all of which include the searchable modifier, in their newest versions). I’d be happy to work on supporting those platforms in the future, if that’s desirable.

This is my first contribution to this repository, so feedback and suggestions are more than welcome. Thanks!

@davdroman
Copy link
Collaborator

davdroman commented Feb 12, 2023

Hi @iansampson, I'm sorry your PR was ignored for such a long time. I'll tidy up the branch with the latest from master and get this merged asap.

@davdroman davdroman changed the title Add .introspectSearchController modifier, which finds a UISearchController from a SwiftUI.View with a .searchable modifier Add .introspectSearchController Feb 12, 2023
@davdroman davdroman merged commit a1a97a8 into siteline:master Feb 12, 2023
@iansampson
Copy link
Contributor Author

Awesome, thanks @davdroman! I’d completely forgotten about this PR and happy to see it merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants