次のエラーが発生します
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;
私の洞窟で.m
- (CLLocationCoordinate2D)coordinate
{
CLLocationCoordinate2D location;
location.latitude = [self.latitude doubleValue];
location.longitude = [self.longitude doubleValue];
return location;
}
私は何かが足りないのですか?