【发布时间】:2011-08-25 14:56:40
【问题描述】:
我正在使用具有以下配置的 MainWindow.xib 文件:
MainWindow.xib
- UITabBar 控制器
- UINavigationBarController
- UITableViewControllerAlpha
- UINavigationBarController
- UITableViewControllerBeta
- UINavigationBarController
- UITableViewController查理
- UINavigationBarController
但基于以下帖子: Why does Core Data initialization fail when I attempt to do it at these points? 以及我放置的断点,我得出的结论是 initWithCoder 被用于初始化所有 UITableViewControllers,并且在应用程序生命周期的那个时刻没有办法可靠地使用 managedObjectContext。
那么这是否意味着我必须放弃我在 MainWindow.xib 中执行的所有“简单”设计工作和布局并以编程方式进行?使用核心数据真的意味着不能使用 NIB 文件吗?还是有一些中间立场?
请告诉我,谢谢!
【问题讨论】:
标签: cocoa-touch core-data xib nib