Simple Way To Load Image Into View?

Discussion in 'Mac Programming' started by Darkroom, Dec 15, 2008.

  1. Darkroom Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #1
    maybe i'm ignorant, but the only way i know how to display an image in a view is with this method:

    Code:
    - (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?
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  3. Darkroom thread starter Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #3
    wow...

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

Share This Page