Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rotate a UI Button in iPhone SDK

Quick and hopefully obvious question.

I have a progmatically created button in my iPhone app that I wish to rotate 45 degrees clockwise, named buttonuq , how can I do this?

like image 246
David26th Avatar asked Sep 26 '10 18:09

David26th


1 Answers

You can use a transformation like :

yourButton.transform = CGAffineTransformMakeRotation(45.0*M_PI/180.0);

Good Luck !

like image 104
Vinzius Avatar answered Sep 25 '22 09:09

Vinzius