mac开发系列24:右键菜单打开文件夹并选中文件

mac实现右键菜单打开文件夹并选中文件,可使用如下系统api:
/* Activate the Finder and open a window selecting the file at the given path. If fullPath is nil, this will instead open the directory specified by rootFullPath, and not select any file. If rootFullPath is the empty string (@""), the file is selected in the main viewer. Otherwise, a new file viewer is opened. */-

(BOOL)selectFile:(nullable NSString *)fullPath inFileViewerRootedAtPath:(NSString *)rootFullPath;

效果图如下:



最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 13,553评论 0 23
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 7,969评论 0 0
  • 你走了,给我留下一个背影,一个问号。 这么些年,已经习惯了默默注视你离去的背影。 不知何日君归来?我从来不问你这句...
    牧野清风阅读 3,218评论 0 5
  • 其实平时看电视就是看别人如何演绎人生 再看看自己该如何度过自己的岁月
    R季阅读 1,202评论 0 0
  • 在主街上,路过典型的白族商业集市,淳朴而又热闹。 喜洲,诞生过开创大理国的传奇人物白王段思齐,是金庸小说《天龙八部...
    Meilin001阅读 3,493评论 0 4

友情链接更多精彩内容