i have code here including usertrackingmode = .follow
, works great pops onto userlocation
instead of animating map go user location ...which want . can tell me hot add animation making map change onto user location animation , not pop onto ( if makes sense )
import uikit import mapkit import corelocation class mapviewcontroller: uiviewcontroller,mkmapviewdelegate, cllocationmanagerdelegate{ @iboutlet weak var mapview: mkmapview! @ibaction func usertrackingmode(sender: anyobject) { mapview.usertrackingmode = .follow }
you can call setusertrackingmode:animated
in order animate transition:
@ibaction func usertrackingmode(sender: anyobject) { mapview.setusertrackingmode(.follow, animated:true) }
Comments
Post a Comment