iphone - NSFetchedResultsController 和 BAD_ACCESS

标签 iphone objective-c core-data nsfetchedresultscontroller

我有一个由 NSFetchedResultsController 提供的 UITableViewController

一切正常,直到我添加

if (self.fetchedResultsController != nil) 
{
  return self.fetchedResultsController;
} 

回到我的开始

-(NSFetchedResultsController *)fetchedResultsController { 

方法。我得到的错误是:

Program received signal:  “EXC_BAD_ACCESS”.

知道为什么会这样吗?我声明

@property (nonatomic, retain) NSFetchedResultsController  *fetchedResultsController; 

在 .h 文件和

@synthesize fetchedResultsController 

在实现文件中。

谢谢~

最佳答案

是否设置递归调用,使用 self.fetchedResultsController 调用 fetchedResultsController 方法?

关于iphone - NSFetchedResultsController 和 BAD_ACCESS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3593161/

相关文章:

iphone - 使用 cocos2d 显示网站

iphone - PCM音频幅度值?

ios - 谷歌地图缩小到 GPS 和标记

iOS:如何在代码中打开我自己的文件格式(例如 .own)

ios - 合并两个 ManagedObjectContext

ios - 核心数据未保存到 TableView

iphone - 使用关系从一对多变为一对一的实体迁移核心数据存储时出现 NSInferredMapping 模型错误

iphone - 从应用程序打开/关闭 iPhone 的 Wifi

objective-c - 请解释中断并继续 Objective-C

ios - registerDefaults 方法设置默认值而不是实际值。?