I was wondering how to set the file extension for a file dialog so that only those files with that extension show up in the folder. I know there is a way to set if files/directories can be seen, and the folder that the file dialog looks in, but haven't come across a way to 开发者_StackOverflow社区set the file extension. Any suggestions?
Use the NSOpenPanel/NSSavePanel method setAllowedFileTypes:
. OS X thinks in terms of file types, not extensions.
精彩评论