Adding an NSImageView to an NSView
Adding an NSImageView to an NSView
- Subject: Adding an NSImageView to an NSView
- From: Duncan Campbell <email@hidden>
- Date: Thu, 7 Apr 2005 16:59:53 +1000
Hey folks.
I'm trying to add an NSImageView subclass to an NSView. Useless snippet:
myImageView = [[NSImageView alloc] init];
[myImageView setImage:[NSImage imageNamed:@"myimage.tiff"]];
[myView addSubview: myImageView];
This seems to work fine (i am setting up the NSRect position of the NSImageView correctly), except my image never shows. I have tried writing some custom coloring code in the NSImageView and it does show correctly on the NSView (i.e. i see a colored square, tracking rects work etc.) - it's just the image that isn't showing.
I have also tried replacing the NSImageView with an NSButton and it shows the image correctly (so it's not something silly like a typo in the image filename).
Anyone have a clue what's (not) going on?
Cheers.
---------------------------------------------------------------
Duncan Campbell
http://www.duncanandsarah.com/duncan
---------------------------------------------------------------
Are we running light with overbyte?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden