-
Re: can I use svg image file in xcode?
eskimo Feb 20, 2017 1:57 PM (in response to mobiweb29)It’s hard to answer this without more information. For example, if you bundle an SVG in your app then it’s trivial to load that into a web view. However, you can’t use an SVG as an app icon.
In what context do you wont to use this SVG?
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: can I use svg image file in xcode?
Macho Man Randy Savage Feb 20, 2017 5:06 PM (in response to mobiweb29)If you mean use an SVG with UIImage (or NSImage on mac) I don't believe it is supported. You could load it in a WebView, as Quinn mentioned. Not sure how well that will work out. There is a third party open source library SVGKit you could look at.
-
Re: can I use svg image file in xcode?
KMT Feb 21, 2017 7:12 AM (in response to mobiweb29)Table C-2 here lists supported image formats:
-
Re: can I use svg image file in xcode?
vimipatel Mar 14, 2017 6:08 AM (in response to mobiweb29)Hello mobiweb29,
Yes you can render .svg files in your application. I have created one application for map that shows data of population in respective country by clicking on country on map.
Here is sample example of rendering svg into app. Some other libraries are their in market. You can find and use according to your requirements.
https://github.com/ArthurGuibert/FSInteractiveMapNote that : I don’t know that Apple Inc. approve your app on store or not. App which I have created it was for our personal use. I didn’t upload that app on store.
-
Re: can I use svg image file in xcode?
ksigiscar@cmc Feb 22, 2017 3:17 AM (in response to mobiweb29)You CANNOT use a SVG directly.
However, there are two indirect options:
1- In Illustrator, convert your SVG to PDF and import the vector image file into an asset catalog in your XCode project
2- Import your SVG file into PaintCode. Generate the Core Graphics code (either Objective C or Swift) and use that in your project.