我想知道您是否可以帮助我了解如何使此代码“ listen
”更改为simperium
. 使用NSFetchedResultsController
时这一切都会自动发生,但是我将如何处理以下代码?试图阅读该文件,但对我来说并不是很清楚。
NSError *error;
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
fetchRequest.entity = [NSEntityDescription entityForName:kPersonEntity inManagedObjectContext:self.managedObjectContext];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"title == queen"];
NSArray *array = [[self.managedObjectContext executeFetchRequest:fetchRequest error:&error] filteredArrayUsingPredicate:predicate];
if(array.count > 0) {
_queen = (Person *)[array objectAtIndex:0];
}
谢谢!