Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c Cocoa中的GTKFileChooser对话框_Objective C_Cocoa_Gtk - Fatal编程技术网

Objective c Cocoa中的GTKFileChooser对话框

Objective 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

我只是想知道Cocoa中是否有类似GtkFileChooserDialog的类。此类在gtk中用于打开文件

有,NSOpenPanel

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,但什么也没找到。