views:

113

answers:

2

1) Is it possible to change the speed of autorotation on the iPhone?

2) Is it possible to time an animation to take place during the autorotation animation? I would like to resize a photo while rotation is occuring, rather than when it's done.

+2  A: 

1) not that I know of

2) Yes, see this method:

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration

http://developer.apple.com/iPhone/library/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006926-CH3-SW53

kubi
A: 

As for the first question, I haven't used this but check it out:

[UIApplication sharedApplication].statusBarOrientationAnimationDuration = [NSTimeInterval ...];

See docs for UIApplication. The problem is that I don't know that this actually rotates the rest of your views. You may, however, be able to rotate the window's coordinate system around "manually" using UIWindow and [UIView beginAnimations ...] in order to recreate the whole effect.

Please post sample code somewhere if you get it working!

Nimrod