In a UIViewController am detecting the view's change in orientation using didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation. I then load a nib that corresponds to the correct device orientation using [[NSBundle mainBundle] loadNibNamed: owner: options:]. Works ok, but is a little clunky looking. Is there a way of animating the change? Thanks.
+1
A:
You can wrap your change with a beginAnimations, like this:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown
forView:window cache:YES]; // You can change the effect
/*
* YOUR CODE HERE
*/
[UIView commitAnimations];
The WebMacheter
2010-10-12 16:50:10