我正在尝试旋转设置为放置在MapKit上的注释的UIImage。我希望在该注释上设置的图像以特定度数旋转。我已经尝试了一些方法,但都没有用。有人可以帮帮我吗? 最佳答案 你应该替换annotationView.transform.rotated(by:CGFloat(M_PI_4))通过这个:annotationView.transform=CGAffineTransform(rotationAngle:CGFloat(Double.pi/4.0))或:annotationView.transform=annotationView.