本文介绍了OS X应用程序中带有TabViewController的情节提要-每个场景中的核心数据阵列控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试Swift / XCode6及其针对OS X的新Storyboard。到目前为止,所有内容都可以在一个选项卡视图控制器中使用三个选项卡场景,并通过可可绑定和数组控制器将它们三个全部连接回核心数据。
是在每个场景中为每个实体创建一个阵列控制器的官方方法,还是有一种更简单或更有效,更好的方法来创建它们然后指向它们?类似于我对ManagedObjectContext所做的操作,该对象在AppDelegate中创建一次,然后在各种视图控制器中进行引用。

I am trying out Swift/XCode6 and its new Storyboard for OS X feature. So far everything works with one tab view controller three tab scenes and having all three of them connect back to core data through cocoa bindings and array controllers.Is the official way to create one array controller per entity in each scene or is there an easier or perhaps more efficient and better way where I create them once and then point to them? Similar to what I do with my managedObjectContext which is created once in AppDelegate and then referenced in the various view controllers.

推荐答案

正确的设计是在每个场景中都有阵列控制器,以满足该场景的需求。

I think the correct design is to have array controllers in each scene, to serve the needs of that scene.

这篇关于OS X应用程序中带有TabViewController的情节提要-每个场景中的核心数据阵列控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 13:33