views:

116

answers:

1

Hi everyone!

When changing the orientation of the iPad, my app rotates its view very fast. It is difficult to perceive the transition between both orientations. I would like to increase a little bit the duration of this transition.

Does anyone know how to increase the duration of this transition?

Thanks!

+1  A: 

Starting from iPhone OS 3.2, UIApplication includes the -windowRotationDuration method, which returns the duration of rotation. It is 0.3 seconds in iPhone mode, and 0.4 seconds in iPad mode. You could override this method to change the rotation speed, e.g.

@implementation UIApplication (OverrideRotationSpeed)
-(NSTimeInterval)windowRotationDuration { return 5.0; }
@end

Now, -windowRotationDuration is a private API, which means you can't use this method, and there are no documented ways to do so, therefore the answer is:-

          No.

KennyTM
But other apps that I have installed in my iPad behaves different. They have a smooth transition when rotating the device. I am using the default split view controller as it cames with no modifications, so either i am not understanding well what I have to do, or there must be a way to modify this behavior. :s
federivo
@federivo: Smooth transition ≠ Slower transition. It's probably your view is too complex. Try to reduce the hierarchy depth.
KennyTM
You are right. The problem is probably related to the composition of views I am using. I composed the detail view of the splitViewController this way: DetailView -> BackgroundView -> ClientView. The background view is used so I can reuse the clientView in portrait and landscape. When in portrait I set background view behind client view to give the impression of having margins and I take it away when changing to landscape. I guess I need to rethink this whole process or figure out another way to reuse client view for both orientations.Thanks @KennyTM !
federivo