openDocumentWithContentsOfURL:di
2019-08-19 本文已影响0人
传说中的汽水枪
在MachOView中使用打开文件的操作:
MVDocument * document = [documentController openDocumentWithContentsOfURL:[NSURL fileURLWithPath:filename] display:YES error:&error];
需要在info.plist
做如下的配置:

这样就能知道的NSDocument类型了(其中MVDocument继承NSDocument)