3 ms·
I was knocking around in SwiftUI last weekend and disappointed to learn that there’s still no native support for SVGs — you're either stuck converting SVG to NS
by Eric_WVGG 5y ago
I was knocking around in SwiftUI last weekend and disappointed to learn that there’s still no native support for SVGs — you're either stuck converting SVG to NSBezierPath, or taking your chances with 3rd-party libraries that come with a laundry list of caveats.
The documents don't mention if their engine is suitable for "dropping in" to the Cocoa/CocoaTouch/NSwhatever system, but gosh, that would be a heck of a treat…
- kccqzy 5y agoDoesn't sound like so. But I imagine it's always possible to use WKWebView to use the new engine once it lands.
- viktorcode 5y agoYou can use SVGs as vector images though. Before that only PDFs were supported for that role.
- Eric_WVGG 5y agoAre you aware of any resources that explain how? I can see that iOS can use SVGs for icon assets and the like, but not in views.
- viktorcode 5y agoI meant image assets, yes. If you want to dig into vector data, then no, there's no support for that.