您的位置:首页 > 其它

+entityForName: could not locate an entity named '*****' in ****

2015-03-26 15:00 483 查看
coreData的教程网上有很多 这里就说一下作为一个初学者 遇到的两大问题

1、+entityForName: could not locate an entity named '*****' in ****这个问题需要你注意一下,



2、

'NSInvalidArgumentException', reason: '+entityForName: nil is not a legal NSManagedObjectContext parameter searching for entity name 'CacheModel''
这里是因为你没有实例化这个东西,加上这两句话就可以了

self.appDelegate = [[UIApplication
sharedApplication] delegate];

_managedObjectContext = [self.appDelegate
managedObjectContext];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐