Objective c Cocoa中的GTKFileChooser对话框
我只是想知道Cocoa中是否有类似GtkFileChooserDialog的类。此类在gtk中用于打开文件 有,NSOpenPanelObjective c Cocoa中的GTKFileChooser对话框,objective-c,cocoa,gtk,Objective C,Cocoa,Gtk,我只是想知道Cocoa中是否有类似GtkFileChooserDialog的类。此类在gtk中用于打开文件 有,NSOpenPanel NSOpenPanel *panel = [NSOpenPanel openPanel]; int result = [panel runModal]; if (result == NSOKButton) { NSArray *allSelectedFiles = [panel URLs]; NSURL *selectedFileURL = [a
NSOpenPanel *panel = [NSOpenPanel openPanel];
int result = [panel runModal];
if (result == NSOKButton) {
NSArray *allSelectedFiles = [panel URLs];
NSURL *selectedFileURL = [allSelectedFiles objectAtIndex:0];
NSLog(@"Selected: %@", selectedFileURL);
}
谢谢!我试图寻找NSFileChooser和NSDialog,但什么也没找到。