#import "MainController.h" #import "DarkView.h" @implementation MainController - (void)awakeFromNib { NSImage *anImage = [[NSImage alloc] initWithData:[NSData dataWithContentsOfFile:@"/Library/Desktop Pictures/Black & White/Wave.jpg"]]; NSRect imageRect = NSMakeRect(0.0, 0.0, [anImage size].width/8, [anImage size].height/8); NSImageView *theImageView = [[NSImageView alloc] initWithFrame:imageRect]; [theImageView setBounds:imageRect]; [theImageView setImage:anImage]; [scrollView setHasVerticalScroller:YES]; [scrollView setHasHorizontalScroller:YES]; [scrollView setBorderType:NSNoBorder]; [scrollView setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin]; [scrollView setDocumentView:theImageView]; [theImageView release]; } @end