ParallaxSwiftUI icon indicating copy to clipboard operation
ParallaxSwiftUI copied to clipboard

Stop using AnyView

Open ZevEisenberg opened this issue 1 year ago • 0 comments

A couple of generics that mean we don't need to use AnyView, which could improve performance since view type information is no longer erased.

By the way, I was poking at this more to figure out how it worked, and your solution is super clever. I was trying to do it the other way around: get the UIInterpolatingMotionEffect to write to a property in UIKit, then exfiltrate the value of that property up to SwiftUI. But yours works the other way around: it wraps a SwiftUI view in a UIView and then applies the motion effects to the wrapper. I dig it!

ZevEisenberg avatar May 10 '24 15:05 ZevEisenberg