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

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

作者: 悲观患者 | 来源:发表于2017-08-14 12:04 被阅读71次

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;

效果图如下:



相关文章

网友评论

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

      本文链接:https://www.haomeiwen.com/subject/vwqurxtx.html