Post

Replies

Boosts

Views

Activity

SVG from Data/File on UIImage
SVG is now supported in asset catalogues and works on UIImage when calling UIImage(systemName:); however, I am not sure how to get it from a file or form a Data/NSData object. I have tried saving the image to temporary and then loading using init(contentsOfFile:), and that doesn't work. I have tried loading it into Data first, and that doesn't work. It seems to only work from within an Asset catalog. Are SVGs only supported in Asset Catalogues?
Topic: UI Frameworks SubTopic: UIKit Tags:
3
1
2.1k
Oct ’21