2

SVGKImage has imageWithData: method which is not implemented.

I also know that I can store NSString object as file and load it to a library via another method. But it would be too slow for me. Are there any other solutions?

user2083364
  • 744
  • 1
  • 7
  • 20

1 Answers1

3

The solution is very strange. They didn't implement imageWithData:, but they almost implemented imageWithString:

#import "SVGKit.h"
#import "SVGKSourceString.h"

NSString *svgStr = ...;
SVGKImage *image = [SVGKImage imageWithSource:[SVGKSourceString sourceFromContentsOfString:svgStr]];
user2083364
  • 744
  • 1
  • 7
  • 20