Skip to content

Instantly share code, notes, and snippets.

@ryanisnhp
Created May 31, 2020 11:46
Show Gist options
  • Save ryanisnhp/860138c79e3bbb2681b019a8a0edbc35 to your computer and use it in GitHub Desktop.
Save ryanisnhp/860138c79e3bbb2681b019a8a0edbc35 to your computer and use it in GitHub Desktop.
//STEP 3: - ANIMATIONS
@objc func animatePolylinePath() {
//Iterate each valid coordinate on the path
if i < path.count() {
newPath.add(path.coordinate(at: i))
newPolyline.path = newPath
newPolyline.strokeColor = UIColor.black
newPolyline.strokeWidth = 4
newPolyline.map = mapView
i += 1
} else {
resetTimer()
startAnimationTimer()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment