2
I would like to create a window to save text files on disk, but do not know how to create a File Explorer using Storyboard.
2
I would like to create a window to save text files on disk, but do not know how to create a File Explorer using Storyboard.
1
I solved this problem with the following code:
var painelSalvar: NSSavePanel = NSSavePanel();
painelSalvar.prompt = "Salvar";
painelSalvar.worksWhenModal = true;
painelSalvar.title = "Salvar Programa";
painelSalvar.message = "";
painelSalvar.runModal();
var arquivo = painelSalvar.URL;
if (arquivo != nil){
let newString : String? = arquivo?.absoluteString!.stringByReplacingOccurrencesOfString("file://", withString: "", options: NSStringCompareOptions.LiteralSearch, range: nil);
return newString!;
}
return "";
Browser other questions tagged swift osx storyboard
You are not signed in. Login or sign up in order to post.
You are developing to
iOS
orOS X
?– Paulo Rodrigues
I’m using OS X
– Pedro Soares