I recently did this, I rotate button 5 at different angles.
here is an example:
UIButton *typewritterButton = [UIButton buttonWithType:UIButtonTypeCustom]; typewritterButton.frame = CGRectMake(15, 165, 130, 25); typewritterButton.transform = CGAffineTransformMakeRotation((0.0174)*135); [m_overlay addSubview:typewritterButton];
This will definitely work for you ...
use CGAffineTransformMakeRotation((0.0174)*135);
just change the value 135, which is the angle at which you want to rotate the object ...
Let me know if there are any problems.
user402982
source share