xcode - iOS mapView animatesDrop -


in mapview, have bool animatesdrop annotations set no. because when mapview annotations plotted during viewwillappear, don't when them animated. however, have refresh button used re-plot annotations , them animated (drop) when pushed. there way of accomplishing this? thanks.

-(mkannotationview *)mapview:(mkmapview *)mapview viewforannotation:(id<mkannotation>)annotation {      if ([annotation iskindofclass:[mkuserlocation class]]) {          return nil;     }      mypin = [[mkpinannotationview alloc] initwithannotation:annotation reuseidentifier:@"current"];      uibutton *calloutbutton = [uibutton buttonwithtype:uibuttontypedetaildisclosure];      uibutton *directionsbutton = [uibutton buttonwithtype:uibuttontypecustom];     directionsbutton.frame = cgrectmake(0, 0, 23, 23);     [directionsbutton setbackgroundimage:[uiimage imagenamed:@"directions.png"] forstate:uicontrolstatenormal];      mypin.leftcalloutaccessoryview = directionsbutton;     mypin.rightcalloutaccessoryview = calloutbutton;     mypin.draggable = no;     mypin.highlighted = no;     mypin.animatesdrop= yes;     mypin.canshowcallout = yes;      return mypin; } 

"hard ball" approach establish boolean property set false in viewwillappear, set true in button's action. set mypin.animatesdrop property in viewforannotation. don't know of "elegant" solution.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -