Question

i'm developing an application for iPad. I have a mapview with several annotations. I need to show a pop-over when the accessory callout method is called, so that the arrow of the popover will point towards the annotation. I am trying to use 'initWithRect' method of the popover, but i'm not getting the co-ordinates(the CGRect in view) of the annotation correctly. How can i get the co-ordinates of an annotation? I need to find out the location of that annotation in the view.

Was it helpful?

Solution

Probably, you can use MKMapView's method convertCoordinate:toPointToView: with specified annotation coordinates (required property of MKAnnotation Protocol) and view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top