Passing Annotation Entity to View Controller
Closed this issue · 2 comments
Hi Claus,
I've hopefully got a quick question re the controller. When using standard annotations I had previously moved from the map view to an annotation entity detail using the following code:
- (void)goToRestaurantDetailsViewController:(id)sender
{ RestarauntEntity *selectedRestaurant = _selectedAnnotation.entity;
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil];
RestaurantDetailsViewController *restaurantDetailsViewController =
[storyboard instantiateViewControllerWithIdentifier:@"restaurantDetailsViewController"];
restaurantDetailsViewController.restaurant = selectedRestaurant;
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:restaurantDetailsViewController animated:YES]; }
I've tried to do this using the clustering controller but keep getting passed to a blank detail view. Do you know how I can do this with the CCHMapClusterAnnotation annotations, I've tried looking at the "How to pass the id of an MKAnnotation via a segue to the next ViewController" question on github but am not having any luck here?
Many thanks,
Matt
Perhaps this example helps. The detail view for this app is called StolpersteinCardsViewController
and it's triggered by tapping on an annotation on the map.
Haven't heard back for this issue in a while – I assume it has been solved.