I am working on a project where I wants to shake the marker on google Map. I am using the custom marker icon to represent on the map. Like a head of person is shaking. I don
You can use marker property to rotate your marker ,
marker.rotation = (you_angle_in_degree) * M_PI / 180.0f;
// convert degree to radian
The Horizontally Shake animation you can get after some time interval change the degree for of the rotation , you can use timer ,
// create a timer
timer = Timer.scheduledTimer(timeInterval: 0.5, target: self, selector: #selector(timerAction), userInfo: nil, repeats: true)
func timerAction() {
// Place you aniamtion logic here ,
// every 0.5 second change the rotation of your maker
}