Display selectedAnnotation info
- by elife_iPhone
When I use this:
- (void)mapView:(MKMapView *)myMapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
NSLog(@"SelectedAnnotations is %@", myMapView.selectedAnnotations);
}
It Displays this in the log.
"<Annotation: 0x586cdb0>"
Now this is a weird question, but how do I get the info from this Annotation? I have lost my mind.
This is what is in the annotation.
myAnnotation = [[Annotation alloc] init];
myAnnotation.dealName=[NSString stringWithFormat:@"%@",[tempValue objectForKey:@"name"]];
myAnnotation.subName=[NSString stringWithFormat:@"Price: $%@",[tempValue objectForKey:@"price"]];
myAnnotation.latitude = [NSNumber numberWithDouble:[[tempValue objectForKey:@"dealLatitude"] doubleValue]];
myAnnotation.longitude = [NSNumber numberWithDouble:[[tempValue objectForKey:@"dealLongitude"] doubleValue]];
myAnnotation.dealId = [NSNumber numberWithInt:[ [tempValue objectForKey:@"dId"] intValue ]];
Thanks for your help.