2

I would like to know if there is an index in MKAnnotation that can be accessed? Like in a tableview, the indexPath.row? Thanks.

Bhumit Mehta
  • 16,278
  • 11
  • 50
  • 64
  • No, they have no specific order. But you can derive your own class from `MKAnnotation`. – fluidsonic Oct 01 '14 at 07:16
  • 1
    The map view does not show ordered data like a table view so there is no "index" built-in. One should not be necessary since the data you need or references to it can be put in the annotation object itself. If you give more details or an example of why you need an index, that would help. –  Oct 01 '14 at 10:37
  • Hello guys thank you for helping me out. I'm trying to making an app which multiple annotation gets its details from plist. I have already done loading each annotation from plist. What I want to do is when I tapped a certain annotation its detail of that certain will shown thru a label from plist. My thoughts is equating an index from plist and thru mkaanotation. I saw some links and tried it but it doesnt show its exact details. – macky040386 Oct 02 '14 at 02:15
  • Hi, i have read from this http://stackoverflow.com/questions/15145448/how-do-i-determine-which-mkannotation-is-clicked, TomSwift that a tag have to be set. Does anyone have an idea how can I set tag an annotation? – macky040386 Oct 02 '14 at 03:03
  • Hello everyone I think i got it. http://stackoverflow.com/questions/9848292/how-to-save-the-selected-mkannotation. Thanks for everyone. – macky040386 Oct 02 '14 at 03:43

0 Answers0