Using interface builder, I want an a button that when clicked shows you a finder window and you can select a folder (not a file). How can I do that?
Thanks!
To allow the user to select a directory, use NSOpenPanel. Here's an example of using it. To restrict what it can select, use its -setCanSelectFiles:
and -setCanSelectDirectories:
methods to configure it before calling its -runModalForDirectory:file:types:
method.
Also, to trigger this from a button, just use IB to connect the button to an action method that you write, and use the above code in that method. See Apple's developer site for details.