Skip to content

Instantly share code, notes, and snippets.

@calimarkus
Created August 31, 2012 15:18
Show Gist options
  • Save calimarkus/3554413 to your computer and use it in GitHub Desktop.
Save calimarkus/3554413 to your computer and use it in GitHub Desktop.
UIImage Loading withouth caching, but as convinient as imageNamed:
@implementation UIImage (NoCaching)
+ (UIImage*) make: (NSString*) filePath
{
NSString* file = [[NSBundle mainBundle] pathForResource: [filePath lastPathComponent] ofType: nil
inDirectory: [filePath stringByDeletingLastPathComponent]];
return [self imageWithContentsOfFile: file];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment