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) 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -