-1

I have a little issue with MKMapView and its annotations, and I can't find what's happening here.

The issue is that sometimes, when I tap an annotation, its callout won't appear.
If I tap it again, it still won't appear.
If I tap another annotation and after that I tap the first one again, the callout will appear.

I checked with an NSLog for title and canShowCallout in didSelectAnnotationView and everything's ok there (the first isn't null and the second is set to true).

What else could make the callouts not appear?

ov1d1u
  • 958
  • 1
  • 17
  • 38
  • Show the viewForAnnotation delegate method. –  Aug 06 '12 at 11:37
  • Here http://pastebin.com/uMAv7Zeu but I don't think that the bug is caused by this function, as I removed it and the bug it's still there. Also I found that if I no longer center the map on selected pin the bug doesn't seems to occur, but I used to center the map on the selected pin long time before this bug to appear. – ov1d1u Aug 06 '12 at 11:49
  • Having a UITapGestureRecognizer on the MKMapView caused problems for me with annotations/callouts. UILongPressGestureRecognizer seems to work fine though. – James Zaghini Sep 06 '12 at 05:10

1 Answers1

0

Found this, which seems to work. I don't really like this kind of workarounds, but as there's no other solution I guess that I have to use what I have...

Community
  • 1
  • 1
ov1d1u
  • 958
  • 1
  • 17
  • 38