1

Sorry for my poor English :"> I have a question about MKMapView and MKAnnotation in MKMapkit of iOS.

I'm writing a small app named "Transport Helper". It contains a map and some annotations in that map to represent places. (Ex: bus station,...).

I added sequence of annotations (id) to that MKMapView and hope they'll appear with order I've add them. But I received result : these annotation appear top -> bottom and left -> right.

Can somebody help me custom that order ???

P.s: I very need that custom because i want display my bus stations follow bus's route :((

Gallgall
  • 15
  • 1
  • 4
  • If you add x annotations, it will show all x annotations (drop order is not guaranteed). How are you expecting to show the "order" of the bus route? Show the code you are using to add the annotations (edit your question). –  Nov 22 '12 at 15:57
  • I used MKPinAnnotationView with drop animation and I want they drop follow bus route (Ex : from A to B have 3 bus station and they will appear one by one depent on bus direction). Thank for your reply. I have resolved it with Craig's advise ! I'm really amateur :| – Gallgall Nov 23 '12 at 15:13

1 Answers1

1

You could add timer that calls a function every 100 milliseconds and adds the next annotation to the view. If they are all added at once iOS will draw them in the order it wants to, but if you give it enough time in between it'll draw the one you give it and be ready and waiting for the next.

Craig
  • 8,093
  • 8
  • 42
  • 74
  • Hi Gallgall. If my answer solved your problem you should click on the tick ("check"?) next to it so other people who need the same help can see that this worked for you (plus it give me points!) :-) – Craig Nov 23 '12 at 22:50