ios - How to rotate the navigation image according to the user direction in MKMapView? -


i show user's current location while toggling location mode on free ride in simulator. it's working fine, take @ image below:

enter image description here

enter image description here

i want image rotate direction of route changes. how can that? here can download project. have not implemented route on below project, changed arrow's direction towards route.

if understand question correctly, want arrow aligned path drawn in map, @ every position on path.

what i'd create cakeyframeanimation path property set path on map, , rotationmode set kcaanimationrotateauto. add animation image view containing arrow.

once you've added animation, set imageview.layer.speed = 0 , control imageview.layer.timeoffset move arrow. value goes 0 1, , interpolates position on path.

coreanimation automatically rotate view in tangential direction path @ every point.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -