如何创建不能创建新文档的基于文档的应用程序? [英] How can I create a document-based application that cannot create a new document?
本文介绍了如何创建不能创建新文档的基于文档的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个基于文档的应用程序,旨在处理现有文档,而不是创建新文档。
I have a document-based application that is designed to process existing documents, not to create new documents.
如何防止应用程序创建新的,
How do I prevent the application from creating a new, blank document when launched by opening it from the Finder?
推荐答案
有一个可以实现的NSApplication委托协议方法。
There is an NSApplication delegate protocol method you can implement.
- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender {
return NO;
}
以下是文档
这篇关于如何创建不能创建新文档的基于文档的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文