Skip to content

Instantly share code, notes, and snippets.

@atg
Created April 16, 2009 15:22
Show Gist options
  • Save atg/96472 to your computer and use it in GitHub Desktop.
Save atg/96472 to your computer and use it in GitHub Desktop.
- (NSImage *)image
{
Class imgClass = [NSImage class];
NSImage *imgObject = [imgClass alloc];
Class selfClass = [self class];
NSBundle *bundle = [NSBundle bundleForClass:selfClass];
NSString *filePath = [bundle pathForResource:@"document__plus" ofType:@"png"];
[allocatedObject initWithContentsOfFile:filePath];
[imgObject autorelease];
return imgObject;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment