Created
June 5, 2014 01:27
-
-
Save kevinw/5511b384c3bf33e469f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (UIImage *)imageNamed:(NSString *)imageName | |
fromBytes:(const Byte *)bytes | |
length:(NSUInteger)length | |
fromRetinaBytes:(const Byte *)retinaBytes | |
retinaLength:(NSUInteger)retinaLength { | |
NSString *bundleName = [FBSettings resourceBundleName]; | |
if (bundleName) { | |
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"%@.bundle/%@", bundleName, imageName]]; | |
if (image) { | |
return image; | |
} | |
} | |
return [FBImageResourceLoader imageFromBytes:bytes | |
length:length | |
fromRetinaBytes:retinaBytes | |
retinaLength:retinaLength]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment