0

Using mapkit framework I want to display a arrow and rotate it, depending on the viewing direction of the user.

My problem is that the rotation center is in the lower left corner of the image.

I read this article about setting the roation center of MkAnnotationViews:

How to set the rotation center of an MKAnnotationView

They say I can use annotationView.layer.anchorPoint to set the rotation center of the view but starting IOS6 mapkit framework the MkAnnotationView.layer property seems to be read only and you can't access annotationView.layer.anchorPoint at all. I doesn't even compile.

Is there another way ?

Community
  • 1
  • 1
Senador
  • 5,580
  • 2
  • 15
  • 12
  • The layer property hasn't changed. What's the exact compiler error? Did you add the QuartzCore framework and import it? –  Oct 22 '12 at 13:00
  • Oh. I added it to Xcode but i didn't call #import to use it. Many thanks for this hint. No Compiler error anymore. I will test it now and give feedback – Senador Oct 22 '12 at 13:14
  • It worked perfectly. Quite a stupid mistake on my side. Thank you – Senador Oct 24 '12 at 09:41

0 Answers0