开发者

show details of point on map - iphone

I have a custom map on my iphone app. I intend to put pins on this map. When the user clicks on a pin, I want a small animation to display the details of that location. If required the user can click on the detail and go to another screen for further processing. I am not sure how best to achieve this. I already have the scrollview and imagevie开发者_如何学JAVAw for the map and can identify pin clicks on it. I now need to put the bit where the detail comes in. I would like this to be like a tableview cell, with multiple information. how do I add a tableview cell to that position in the imageview?

Can anybody help please?

Thanks...


See this tutorial how annotation works... http://blog.objectgraph.com/index.php/2009/04/08/iphone-sdk-30-playing-with-map-kit-part-3/...

What you are looking for is there is a property called rightCalloutAccessoryView

- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation
{
  //Create a annotation view here
    annotationView.rightCalloutAccessoryView = yourAnnotationButton;
}

which you can set a button up there. There is a delegate when this button clicked..

- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
   // Go to your next view.
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜