| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
The problem you have is that the main bundle is not _yours_.
The main bundle is the system preferences application bundle...
You can do that with the following code (I'm sure it's not the best way) :
- (void) mainViewDidLoad
{
NSBundle *prefBundle;
NSString *pathForResource;
NSImage *logofile;
prefBundle = [NSBundle bundleForClass: [self class]];
pathForResource = [prefBundle pathForResource: @"logo" ofType:
@"tiff"];
logofile = [[NSImage alloc] initByReferencingFile: pathForResource];
// Probably, you can use your line of code, with a little change, instead
of mine :
// logofile = [NSImage imageNamed: pathForResource];
[logo setImage:logofile];
....
}
Regards
Yves
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.