Reputation: 2891
So the NSSavePanel currently returns a file url complete with extension, and your app has permission to write to that file.
Is there any way to allow the user to select a directory to write to? For example, if the app is exporting a dozen images at once, the names won't be specified by the user in advance.
Upvotes: 10
Views: 1190
Reputation: 648
You need NSOpenPanel.
NSOpenPanel * openPanel = [NSOpenPanel openPanel];
[openPanel setCanChooseFiles:NO];
[openPanel setCanChooseDirectories:YES];
[openPanel setAllowsMultipleSelection:NO];
Upvotes: 7