这是我的代码:
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setAllowsMultipleSelection:YES];
[panel runModal];
NSInteger count = [[panel URLs] count];
for (int i=0; i<count; i++) {
NSLog(@"%@", [[panel URLs] objectAtIndex:i]);
}
但输出类似于file://localhost/Volumes/....
如何获取所选文件的基本名称(例如 Cat.jpg)?