Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Suggesting a previous location to a save panel
NSSavePanel *savePanel = [NSSavePanel savePanel];
NSURL *url = [self mostRecentlySavedToURL];
[savePanel setDirectoryURL:[url URLByDeletingLastPathComponent]];
[savePanel setNameFieldStringValue:[url lastPathComponent]];
// Finish configuring and run the save panel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.