PDA

View Full Version : Simple Way To Load Image Into View?




Darkroom
Dec 15, 2008, 11:37 AM
maybe i'm ignorant, but the only way i know how to display an image in a view is with this method:


- (void)drawRect:(NSRect)rect
{
NSPoint imagePosition;
imagePosition = NSMakePoint(0,0);
aboutImage = [NSImage imageNamed:@"image.png"];
[aboutImage dissolveToPoint: imagePosition fraction:(1.0)];
}


this also requires subclassing and writing the NSView object... it all seems like such overkill just to display an picture...

are there any other more simplistic options?



kainjow
Dec 15, 2008, 01:47 PM
NSImageView :)

Darkroom
Dec 15, 2008, 01:53 PM
wow...

let's just pretend i was joking with my question...