Skip to content

Adding passesTouchesThrough to SwiftUI VariableBlur#20

Merged
TimOliver merged 1 commit intoTimOliver:mainfrom
alpennec:main
Mar 5, 2026
Merged

Adding passesTouchesThrough to SwiftUI VariableBlur#20
TimOliver merged 1 commit intoTimOliver:mainfrom
alpennec:main

Conversation

@alpennec
Copy link
Copy Markdown
Contributor

Hello,

This PR introduces a configuration option to control whether touch events pass through the blur view in SwiftUI. Cf my issue #19.

Surprisingly, setting .allowsHitTesting(true) on the SwiftUI View was not working, so I added this configuration.

By default, touch pass-through remains enabled, preserving the previous behavior and ensuring backward compatibility.

Feel free to change the name of the variable and modifier if something better comes to your mind. I didn't want to use the SwiftUI allowsHitTesting because the semantics were not correct in my opinion.

Thank you!

Regards,
Axel

@TimOliver
Copy link
Copy Markdown
Owner

TimOliver commented Mar 5, 2026

Thanks for the PR Axel!

Yeah, my original idea for this UI component was it was always an accessory view to another UI component, so there should never be a use-case where this view itself is interactive.

If you've got a use-case, that's fine with me. I'll cut another release version soon!

@TimOliver TimOliver merged commit 863043d into TimOliver:main Mar 5, 2026
@alpennec
Copy link
Copy Markdown
Contributor Author

alpennec commented Apr 2, 2026

Hey @TimOliver,

Any visibility on the next release with my merged PR please?

Thanks,

  • axel

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