The Twitter app is a tab bar app on the iPhone. Nothing in any of the tabs will rotate, yet, when you click on a link from a tweet, the view controller that is pushed on top of it IS allowed to rotate. The only rotations I have ever doe is from tilting the device, landscape or portrait, but I don't understand how to use 2d transformations and animations to rotate views.
How do you rotate any view with that's a subclass of UIView?
You can use UIView animations and Transform methods. For rotating 90 degrees:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
imageView.transform = CGAffineTransformMakeRotation(M_PI_2);
[UIView commitAnimations];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With