code_junkie

How do I make an OS X application react when a file, picture, etc is dropped on its dock icon

Nov 14th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
  2.  
  3. - (BOOL)applicationOpenUntitledFile:(NSApplication *)theApplication
  4.  
  5. whatever = [[YourObject alloc] init];
  6. [[NSApplication sharedApplication] setDelegate:whatever];
Add Comment
Please, Sign In to add comment