Trying to display a static image on my window. Any tips would be great
Trying to display a static image on my window. Any tips would be great
- Subject: Trying to display a static image on my window. Any tips would be great
- From: Papa-Raboon <email@hidden>
- Date: Tue, 1 Jul 2008 14:41:24 +0100
Hi All,
I have been trying to get a static image to display in a corner of my
window and it has to literally just sit there and do nothing however I
have searched and searched Apple's dodumentation but no success yet.
I have dropped an Image View onto the window in IB and set the
following in my .h file in Xcode:
IBOutlet NSImageView *theImage;
Then in my .m file I have this so far:
NSString *imageName;
NSImage *tempImage;
imageName = [[NSBundle mainBundle] pathForResource:@"logo" ofType:@"PNG"];
tempImage = [[NSImage alloc] initWithContentsOfFile:imageName];
My image is set in my project in the resources folder and is called
logo.png and I hooked up the object to the NSImageView using IB.
Can't seem to get it to display. I believe I have a line of code
missing that will tie my MSImage to my NSImageView but not sure how.
Any Ideas please?
I'm pretty new to cocoa and don't understand all the lingo yet so be
gentle please.
Cheers
Paul
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden