Not found in protocol
- by Alex
I've subclassed MKAnnotation so that i can assign objects to annotations and then assign this object to a view controller like so:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control {
PlaceDetailView *detailView = [[PlaceDetailView alloc] initWithStyle:UITableViewStyleGrouped];
detailView.place = [view.annotation place];
[self.navigationController pushViewController:detailView animated:YES];
[detailView release];
}
This is working great but i'm having the following issues:
If i try and access the place getter method like so view.annotation.place i recieve an error:
Accessing unknown place getter method
If i acces the place getter method like so [view.annotation place] i receive a warning:
place not found in protocol
From my understanding this is because the place object is not defined in the MKAnnotation protocol, although i'm aware of this i'm not sure how to tell the complier that place does exist and it's not calling it blind.