What do I have to do, if I need to rotate a UIImageView
? I have a UIImage
which I want to rotate by 20 degrees.
The Apple docs talk about a transformation matrix, but that sounds difficult. Are there any helpful methods or functions to achieve that?
Here's an extension for Swift 3.
Usage:
This is an easier formatting example (for 20 degrees):