SVG assets vs UIBezierPath - SwiftUI

Viewed 174

Is it better to use the SVG assets in my SwiftUI app and call them in the Image(...) initialiser, or convert them to UIBezierPaths using websites like https://swiftvg.mike-engel.com/? There's some advantages with just using the SVG assets themselves, like keeping the colour information (some of the icons have very tricky gradients) and the corner radii.

I know there is also a tool to convert an SVG icon directly to a SwiftUI Shape, and it works great for simple icons but then breaks down with more complex icons.

Maybe there's a big performance benefit to using a UIBezierPath – or it could already be rendering the SVG asset as a UIBezierPath under the hood.

What would you advise?

0 Answers
Related