How can I load vector image directly with iPhone SDK? Just as UIImage loads bitmap images.
Asked
Active
Viewed 8,580 times
2 Answers
5
I did this recently using PDF. I saved some resolution independent images directly from Illustrator (using the smallest file size preset). I have some code (gists) here.

nielsbot
- 15,922
- 4
- 48
- 73
-
There is also a category for UIImage so that you load PDF as UIImage into any UIImageView or any view: https://github.com/mindbrix/UIImage-PDF – Uygar Y Apr 10 '14 at 16:48
4
As of iPhone OS 2.1, the iPhone's WebKit supports SVG graphics natively. You should be able to use a UIWebView to load the SVG element for display. This question provides some sample code for doing so.

Community
- 1
- 1

Brad Larson
- 170,088
- 45
- 397
- 571