【发布时间】:2013-10-04 01:12:36
【问题描述】:
我可以在我的应用程序中使用 Preview.app 在path 打开一个 PDF 文件
[NSWorkspace.sharedWorkspace openFile: path];
但是,我想在某个页面上使用该文件启动 Preview.app。这可能吗,例如通过在NSWorkspace's 中传递特定的NSAppleEventDescriptor
- (BOOL)openURLs:(NSArray *)urls withAppBundleIdentifier:(NSString *)bundleIdentifier options:(NSWorkspaceLaunchOptions)options additionalEventParamDescriptor:(NSAppleEventDescriptor *)descriptor launchIdentifiers:(NSArray **)identifiers
方法? QuickLook 可以做到这一点,我想模仿这种行为。
感谢您的帮助!
【问题讨论】:
-
Preview 没有 AppleScript 字典,因此可能不容易弄清楚 QuickLook 是如何做到的。