Make a button rotate counterclockwise using CGAffineTransform swift 3 syntax?

Viewed 4996

I'm trying to make a button rotate counterclockwise but for some strange reason it's rotating clockwise. I know the previous way to do it is by M_PI but it's been deprecated for swift 3 and replaced with CGFloat.pi. I've tried:

   self.loginButton.transform = CGAffineTransform(rotationAngle: -CGFloat.pi)

but it still moves clockwise. Any idea what the syntax is to move counterclockwise?

1 Answers
Related