I am rotating image through this code
UIView.animate(withDuration: 2) {
self.blueNeedleImageView.transform = CGAffineTransform(rotationAngle: CGFloat(myDegreeValue * Double.pi / 180))
}
Problem is that it is rotating in shortest path. I want always clockwise rotation and rotation degree is variable. this and this does not provide a solution.
Just split it to two animations if the angle is more than 180°.