How can I load vector image directly with iPhone SDK? Just as UIImage loads bitmap images.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
回答2:
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.