Skip to content

Instantly share code, notes, and snippets.

@toddfreese
Created February 2, 2012 18:55
Show Gist options
  • Select an option

  • Save toddfreese/1725106 to your computer and use it in GitHub Desktop.

Select an option

Save toddfreese/1725106 to your computer and use it in GitHub Desktop.
var chooseFile = [CPOpenPanel openPanel];
[chooseFile setCanChooseFiles:YES];
[chooseFile setCanChooseDirectories:NO];
[chooseFile setAllowsMultipleSelection:NO];
var result = [chooseFile runModal];
if (result == CPOKButton) {
CPLog(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment