Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用图像填充“打开最近”菜单,因为它们正在我的应用程序中进行处理,但是当我单击列表中的一个项目时,我收到错误“应用程序 MyApp 无法打开 PNG 类型”或类似内容。
在哪里可以自定义代码以指定如何“打开”我的应用程序可以处理的图像?
回答 感谢 Antwan 为我指明了正确的方向。我只是在我的代表中实现了以下内容:
- (BOOL) application:(NSApplication *)sender openFiles:(NSArray *)filenames;
您的 NSApplicationDelegate 类需要响应文件的打开,并且为了让 mac os x 识别您的应用程序能够打开此类应用程序,您需要修改 info.plist