简体   繁体   中英

Specifying initial directory for NSOpenPanel RunModal?

Seems like I must be overlooking something in documentation.

How do I specify a directory I want to start in when I use runModal with NSOpenPanel.

Some methods are deprecated in 10.6.

You set this using setDirectoryURL before displaying the panel with beginSheetModalForWindow:completionHandler:

It's specified in the documentation . NSOpenPanel subclasses NSSavePanel so you can use those methods as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM