I imported SVGKit, but nothing shows.
-
(void)viewDidLoad {
[super viewDidLoad];
SVGKImage *svgImage = [SVGKImage imageNamed:@"Coins.svg"];
if (svgImage) {
NSLog(@"svg not null");
}
NSImage *image = svgImage.NSImage;
if (image) {
NSLog(@"not null");
}
[self.imageView setImage:image];
}
The imageView is nothing showed, and the output is:
2016-02-16 18:14:03.185 ABc[30399:3049067] svg not null
2016-02-16 18:14:03.251 ABc[30399:3049067] CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no scheme
2016-02-16 18:14:03.252 ABc[30399:3049067] not null
Thanks~