【问题标题】:In OS X who owns the model, NSDocument or NSViewController在拥有模型、NSDocument 或 NSViewController 的 OS X 中
【发布时间】:2016-10-09 01:47:30
【问题描述】:

在 iOS 中工作我从未处理过基于 OS X 和 NSDocument 的应用程序。模型引用应该在哪里,在 NSDocument 或 NSWindow 的内容 NSViewController 中的代表对象中?还是两者兼有?

【问题讨论】:

    标签: macos cocoa nsdocument nsviewcontroller


    【解决方案1】:

    它应该存储在 NSDocument 对象中,正如 Apple 文档 here 中所述。特别要检查图 1-1。此外,在同一页面上,Apple 声明数据模型对应于文档类型,因此如果您有不同的模型,您应该使用应该存储在 NSDocument 对象中的不同文档类型。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多