Skip to content

Instantly share code, notes, and snippets.

@dystonie
Created August 20, 2012 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dystonie/3403812 to your computer and use it in GitHub Desktop.
Save dystonie/3403812 to your computer and use it in GitHub Desktop.
Open Panel
NSOpenPanel *openPanel = [[[NSOpenPanel alloc] init] autorelease];
[openPanel setAllowsMultipleSelection:NO];
[openPanel setAllowedFileTypes:filetypes];
if ([openPanel runModal] == NSFileHandlingPanelOKButton) {
//Some code to do
}
else {
//If cancel was clicked
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment