Reputation: 391
I wanted to know, how can I change to a different view that I created using Storyboard by clicking on a Google Map object ( marker for e.g) . What I am trying to do is, when a user clicks on a marker representing a location on google maps, the app should now go to a different page where some details of the location will be displayed. I couldnot figure out the way to do it.
Upvotes: 0
Views: 294
Reputation: 5890
First you need to implement the GMSMapViewDelegate
and set mapView.delegate = self;
Then use -mapView:didTapMarker:
to listen to when someone taps a Marker
Then call -performSegueWithIdentifier:sender:
to load the new view
Upvotes: 1
Reputation: 125017
One way is to use -performSegueWithIdentifier:sender:
when the user taps on the marker. It's essentially the same situation that's covered in Programming tableviews segue drill down, except that you're using a map and that question uses a table.
Upvotes: 2