Я получаю следующую ошибку
2011-09-05 08:08:43.506 CaveConditions[7203:11903] -[NSManagedObject coordinate]: unrecognized selector sent to instance 0x7471910
2011-09-05 08:08:43.507 CaveConditions[7203:11903] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSManagedObject coordinate]: unrecognized selector sent to instance 0x7471910'
Это то, где я называю это
NSFetchRequest *request = [[NSFetchRequest alloc] init];
request.entity = [NSEntityDescription entityForName:@"Cave" inManagedObjectContext:self.context];
request.predicate = [NSPredicate predicateWithFormat:@"(latitude > 0) AND (longitude > 0)"];
[self.mapView addAnnotations:[self.context executeFetchRequest:request error:NULL]];
Сбой в строке addAnnotations
В моем Cave.h (Это как делегат MKAnnotation)
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
В моем Cave.m
- (CLLocationCoordinate2D)coordinate
{
CLLocationCoordinate2D location;
location.latitude = [self.latitude doubleValue];
location.longitude = [self.longitude doubleValue];
return location;
}
Я что-то упустил?
![enter image description here](https://i.stack.imgur.com/Xo6gh.png)