Skip to content

Conversation

@scinfu
Copy link

@scinfu scinfu commented Oct 2, 2014

If this library is linked into a framework all resources will not be found ,the right way to load images is to use this api
imageNamed:(NSString *) inBundle:(NSBundle *) compatibleWithTraitCollection:(UITraitCollection *)
but is supported only in iOS8 .

I fix this issue using [[NSBundle bundleForClass:[self class]]resourcePath]>

@allaire
Copy link

allaire commented May 13, 2015

@scinfu Was the "2x" if really required?

Might be cleaner to do:

UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfFile:imagePath] scale:[UIScreen mainScreen].scale];

@allaire
Copy link

allaire commented May 13, 2015

Just opened a new PR with less code, it loads retina images correctly: #131

@scinfu scinfu closed this Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants