2 starwar2012 starwar2012 于 2013.07.11 11:02 提问

fetchObjectsForEntityName: 无效方法

问题很麻烦。输入fetchObjectsForEntityName时,给了一个警告:

No visible @interface for 'NSManagedObjectContext' declares the selector 'fetchObjectsForEntityName:withPredicate:'

代码:

-(SyncObject *)objectWithSyncID:(NSString *)syncID inContext:(NSManagedObjectContext *)context {

    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"syncID == %@", syncID];

    NSSet *set = [context fetchObjectsForEntityName:@"SyncObject" withPredicate:predicate];
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!