When it comes to rotating a UIViewController, you can tweak two ways so you can rotate and move your own views.
In a one-step process, an implementation of willAnimateRotationToInterfaceOrientation provided in your UIViewController-derived class. It is called, and you can start rotating your object, so that when the system rotates everything else, your object rotates as an enemy, so it looks like it remains in place. You want to calculate how much for the opposite rotation and in which direction based on the current orientation of the interface and the new orientation.
Another way is to receive a notification about the execution of arbitrary rotation in two stages. For example, in the first half, you can squeeze an object down, move it and partially rotate it, and then in the second half, end the rotation while you zoom out to normal size. This is a pretty smart way to make the rotation animation more smoothly with the eye.
For a two-step process, you need to define two methods. willAnimateFirstHalfOfRotationToInterfaceOrientation is called for the first half of the rotation (i.e. up to 45 degrees for a 90 degree rotation and at 90 degrees for an inverted somersault). After this point, the second half is called through willAnimateSecondHalfOfRotationFromInterfaceOrientation .
If your object has a 1: 1 aspect ratio (i.e., square or round), and is in the middle of the view, then the one-step process is likely to work fine. But if it is a non-square object and it needs to move the position (for example, if it is at position 40, 60 in the portrait, but moves 20, 100 into the landscape) and may even require a bit of scaling to look better, then you might want to try the two-step process and see if it looks smoother.
If your object is inside its own individual UIView, then it's pretty easy to schedule a rotation through the UIView animation. Simply create a transformation using CGAffineTransformMakeRotation , then inside the pair of UIView blocks beginAnimations / commitAnimations set the transform property of the view to this value. You can set the time using setAnimationDuration .
EDIT:. Based on the comments, I add code to show how you can attach the view to the top-level window, and not to the view controller. Then your object will be in this view instead of being controlled by the controller (which rotates). You still need to override the rotation methods of the UIViewController, but instead of rotating the object under the control of the view controller, you cause a counter rotation in the object at the top level.
To add a view to the top-level window:
YourAppDelegate* windowDelegate = ((YourAppDelegate*) [UIApplication sharedApplication].delegate); [windowDelegate.window addSubview:yourView];
Keep a link to yourView somewhere that you can get to, and then in the UIViewController willAnimateRotationToInterfaceOrientation meet rotation around yourView, that is, calculate how many reasons to view in the opposite direction to where you are going - if the phone is rotated 90 degrees clockwise arrow, you want to rotate the view back 90 degrees counterclockwise, etc. Then use the UIView animation on yourView .