ios - Is it possible speed up the drop of annotation in MKMapView? -
i have 30 annotations in map , want speed dropping animation.
is possible speed drop of annotation in mkmapview or drop of them @ once?
you'll need implement own drop animation in didaddannotationviews
delegate method. should set animatesdrop
no
avoid possible double animation.
- (void)mapview:(mkmapview *)mapview didaddannotationviews:(nsarray *)annotationviews { nstimeinterval delayinterval = 0; (mkannotationview *annview in annotationviews) { cgrect endframe = annview.frame; annview.frame = cgrectoffset(endframe, 0, -500); [uiview animatewithduration:0.125 delay:delayinterval options:uiviewanimationoptionallowuserinteraction animations:^{ annview.frame = endframe; } completion:null]; delayinterval += 0.0625; } }
this drops annotations @ rate specify.
to drop them @ once, hard-code delay
parameter 0.0
instead of incrementing delayinterval
.
Comments
Post a Comment