I'm trying to load an image using NSImage imageNamed: method but i have no success
i have copied the image in the project folder: Project>Resources and added to the project using: "Add files to project ..."
NSImage* image = [NSImage imageNamed:@"logosH"];
if (image == nil){
NSLog(@"NULL :/");
}
NSImageView *accessory = [[NSImageView alloc] initWithFrame:NSMakeRect(0,0,200,55)];
[accessory setImageScaling:NSScaleToFit];
[accessory setImage:[NSImage imageNamed:@"logosH.png"]];
[myAlert setAccessoryView:accessory];
[myAlert setIcon:[NSImage imageNamed:@"HipArthroplastyTemplating.tiff"]];
[myAlert runModal];
here is the code. i have tried every explanation and solution that i can found in other questions but doesn't work, i'm getting the NULL message in console and the setIcon loads anything
i guess that is something with the bundle or something like that (i'm learning Objective-C so this is new)
I have used the code of an example of cocoa developer but doesn't work, i have tried to load my image in that project and it works there!!! but no in my project :/
any help, any idea? thanks a lot