Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SVGKImage 具有imageWithData:未实现的方法。
imageWithData:
我也知道我可以将NSString对象存储为文件并通过另一种方法将其加载到库中。但这对我来说太慢了。还有其他解决方案吗?
NSString
解决方案很奇怪。他们没有实施imageWithData:,但他们几乎实施了imageWithString:
imageWithString
#import "SVGKit.h" #import "SVGKSourceString.h" NSString *svgStr = ...; SVGKImage *image = [SVGKImage imageWithSource:[SVGKSourceString sourceFromContentsOfString:svgStr]];