Apple Developer Documentation

let randAngle: CGFloat = CGFloat.random(in: 0.0 ... 360.0)
rotateView.transform = CGAffineTransform(rotationAngle: randAngle)

애니메이션이 동작하고 있는 뷰에 회전처리를 했을 때, 의도치 않은 동작이 나올 경우