SHARE
TWEET

Screenshot Location

a guest Dec 24th, 2010 73 Never
  1.         NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  2.         NSDictionary *screencaptureDefaults = [defaults persistentDomainForName:@"com.apple.screencapture"];
  3.         NSLog(@"Defaults %@", screencaptureDefaults);
  4.         if (screencaptureDefaults) {
  5.                 NSString *location = [screencaptureDefaults objectForKey:@"location"];
  6.                 if (location && (location = [location stringByExpandingTildeInPath]) && [[NSFileManager defaultManager] fileExistsAtPath:location]) {
  7.                         screenshotLocation = [[NSString stringWithString:location] retain];
  8.                 }
  9.         }
RAW Paste Data
Top