You cannot do this in Interface Builder, but the code is pretty simple.
Make sure you connect the button in IB to IBOutlettype UIButton*(call myButton). Then, once the thread has loaded (for example, in your method viewDidLoad), you can use something like this:
#define RADIANS(degrees) ((degrees * M_PI) / 180.0)
CGAffineTransform rotateTransform = CGAffineTransformRotate(CGAffineTransformIdentity,
RADIANS(30.0));
myButton.transform = rotateTransform;
Ramin source
share