xcode - Rotate UIImageView 1 degree -
i have code rotate image view:
func rotateagain(){ uiview.animatewithduration(1.0, delay: 0.0, options: .curvelinear, animations: {self.imageview.transform = cgaffinetransformrotate(self.imageview.transform, 1.degreestoradians)}, completion: {finished in if self.rotating { self.rotateonce() }}) }
what wrong in code?
the second argument cgaffinetransformrotate
angle, in radians, if want transform radians degrees, have multiply angle in degrees 0.0174532925
example rotating 240 degrees:
cgaffinetransformrotate(self.imageview.transform, 240 * 0.0174532925)