问题描述
在 MacOS 应用程序中,我使用 NSOpenPanel
以便用户可以浏览和选择多个图像,如下所示:
NSOpenPanel *panel = [NSOpenPanel openPanel];
panel.canChooseDirectories = NO;
panel.canChooseFiles = YES;
panel.allowsMultipleSelection = YES;
panel.resolvesAliases = YES;
panel.allowedFileTypes = [NSImage imageTypes];
panel beginWithCompletionHandler:^(NSModalResponse result) {
...
这很好用,除非文件是符号链接(下图左图),但是当使用符号链接时,用户只能选择单个图像(下图右图):
有一些较早的相关问题:
- How to NOT resolve symbolic links in NSOpenPanel?
- Why can I select aliases but not symbolic links in NSOpenPanel?
我在这里没有使用别名,我不在乎路径是如何解析的。
知道如何允许使用 NSOpenPanel
选择多个链接吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)