Q: How to set the orientation of an Image View programatically I'm looking for, what I hope is, a quick solution to a problem I'm having regarding image view orientation in xcode 6. I would like to be able to change the angle of an image view through the viewcontroller class file, preferably by changing a property value. Ideally I'm hoping something similar to
@IBOutlet weak var Picture: UIImageView!

func changeangle(angleValue: int) {
Picture.angle = angleValue
}

but am really open to any solution. I've checked apple's developer library, but couldn't find anything (maybe I missed something though). Also, if it could be in swift, that would be awesome, but obj-c works too. Thanks in advance.

A: You may try like:
Picture.transform = CGAffineTransformMakeRotation(angleValue / 180.0 * M_PI)

For a brief understanding of CGAffineTransformMakeRotation have a look at this doc as well.
