If we want rotate a view an angle, use this line.
self.label.transform = CGAffineTransformMakeRotation((45.0 * CGFloat(M_PI)) / 180.0)
To rotate right angle, change to 90 degrees.
self.label.transform = CGAffineTransformMakeRotation((90.0 * CGFloat(M_PI)) / 180.0)
To rotate upside down, change to 180 degrees.
self.label.transform = CGAffineTransformMakeRotation((180.0 * CGFloat(M_PI)) / 180.0)
No comments:
Post a Comment