this isn't working right now, but i think i'm on the right path... maybe i just have something small missing from the method?
it's an IBAction method. user activates the actions, the NSView is suppose to convert into a TIFF and save itself to the desktop.
it's an IBAction method. user activates the actions, the NSView is suppose to convert into a TIFF and save itself to the desktop.
Code:
-(IBAction)saveViewToDesktop:(id)sender
{
[self lockFocus];
NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:[self bounds]];
[self unlockFocus];
NSData *data = [rep TIFFRepresentation];
NSString *filePath = @"/Users/[I]myrealname[/I]/Desktop/";
[data writeToFile:filePath atomically:YES];
}