简体   繁体   English

如何直接使用iPhone SDK加载矢量图像?

[英]How can I load vector image directly with iPhone SDK?

How can I load vector image directly with iPhone SDK? 如何直接使用iPhone SDK加载矢量图像? Just as UIImage loads bitmap images. 就像UIImage加载位图图像一样。

I did this recently using PDF. 我最近使用PDF做了这个。 I saved some resolution independent images directly from Illustrator (using the smallest file size preset). 我直接从Illustrator保存了一些独立于分辨率的图像(使用最小的文件大小预设)。 I have some code (gists) here . 在这里有一些代码(gists)。

As of iPhone OS 2.1, the iPhone's WebKit supports SVG graphics natively. 从iPhone OS 2.1开始,iPhone的WebKit本身就支持SVG图形。 You should be able to use a UIWebView to load the SVG element for display. 您应该能够使用UIWebView加载SVG元素以供显示。 This question provides some sample code for doing so. 这个问题提供了一些示例代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM