I\'m trying to pass the data that I have currently loaded into annotations via Google Places API into a detail view controller that I have created via storyboard with a segu
In mapView
Delegate method
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
[self performSegueWithIdentifier:@"showBarDetails" sender:view];
}
In prepareForSegue
:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if([[segue identifier] isEqualToString:@"showBarDetails"])
{
MapPoint *annotation = (MapPoint *)view.annotation;
BarDetailViewController *bdvc = segue.destinationViewController;
bdvc.name = annotation.name;
bdvc.otherProperty = annotation.otherProperty;
}
}