Reputation: 3209
As we all know, to move map markers we have to use this code
UIView.animate(withDuration: 10, animations: {
self.marker.coordinate = newCoordinate
})
but in this case, during all 10 seconds my annotation are not clickable! they only became clickable on 11 second.
I know I can use Timer and calculate coordinates myself as in Google maps, but maybe you know better solution?
Upvotes: 0
Views: 74
Reputation:
change to : options: UIViewAnimationOptions.AllowUserInteraction
UIView.animate(withDuration: TimeInterval(timeLeft), delay: 0, options: UIViewAnimationOptions.AllowUserInteraction, animations: {
Format the code above, you get the idea.
Taken from here where I answered similar question:
Upvotes: 2