Skip to content

SVGKImage's property NSImage is not nil but not show, and error output. #20

@melody5417

Description

@melody5417

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~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions