views:

464

answers:

1

Hi all, 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.

+1  A: 

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

kpower
This worked for me. Thanks!
bentford