美文网首页
openDocumentWithContentsOfURL:di

openDocumentWithContentsOfURL:di

作者: 传说中的汽水枪 | 来源:发表于2019-08-19 10:21 被阅读0次

在MachOView中使用打开文件的操作:

MVDocument * document = [documentController openDocumentWithContentsOfURL:[NSURL fileURLWithPath:filename]   display:YES  error:&error];

需要在info.plist做如下的配置:

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

相关文章

网友评论

      本文标题:openDocumentWithContentsOfURL:di

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