我的NSFetchRequest有问题,它似乎没有获取任何数据,代码如下:
-(void)addAnnotations
{
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"WayPoint" inManagedObjectContext:managedObjectContext];
[request setEntity:entity];
//NSPredicate *predicate = [NSPredicate predicateWithFormat:@"waypoint_map_id=%i", 98];
//[request setPredicate:predicate];
NSError *error;
listArray = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
[request release];
NSLog(@"Array: ", listArray);
}
答案 0 :(得分:0)
问题解决了:
NSLog(@"Array: %d", listArray);