myriadmobile / BetterKit

A collection of useful tools to enhance standard application development
MIT License
0 stars 0 forks source link

Add view rotation extension #11

Open Janglinator opened 5 years ago

Janglinator commented 5 years ago
func rotate(angle: CGFloat) {
    let radians = angle / 180.0 * CGFloat.pi
    let rotation = self.transform.rotated(by: radians)
    self.transform = rotation
}