A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view’s background.
“Ima use this in my app…”
Introducing Metal to SwiftUI workflow requires the same level of care and attention you’d give to adopting a rescue hyena. In many ways it’s an architectural decision. Have fun, but proceed with caution. ☺️
“This approach could be more efficient!”
Absolutely it can! In multiple ways. This is a proof of concept I put together over a couple of lunches during WWDC 2022. There’s plenty of room for improvement and I have a short attention span. Run wild and make it better. Or stare in wonder at the waste of a perfectly good GPU. ?
I’d love to hear from you
Photo by Thomas Lardeau