SVGKImage 有 imageWithData:
方法未实现。
我还知道我可以将 NSString 对象存储为文件并通过另一种方法将其加载到库中。但这对我来说太慢了。还有其他解决办法吗?
最佳答案
这个解决方案很奇怪。他们没有实现imageWithData:
,但他们几乎实现了imageWithString
:
#import "SVGKit.h"
#import "SVGKSourceString.h"
NSString *svgStr = ...;
SVGKImage *image = [SVGKImage imageWithSource:[SVGKSourceString sourceFromContentsOfString:svgStr]];
关于ios - SVG 套件。 NSString 到 SVGKImage?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20738860/