David26th
David26th

Reputation: 401

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?

Upvotes: 6

Views: 8124

Answers (1)

Vinzius
Vinzius

Reputation: 2901

You can use a transformation like :

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

Good Luck !

Upvotes: 18

Related Questions