iPod app view transition like question - tabBar view to cowerflow view transition
Hi,
I will post same question into this section as well.
I want to archive view transition effect, similar to that in iPod app. When the device is flipped to a landscape orientation the tabBar view fades out and a full screen cover flow view slowly fades in and vice versa.
I was able to achieve view transition but with one problem. Here's what I've done so far:
1) I have an application where the top level view is a tabBarController
2) I've sub-classed tabBarController where I determine if the device is rotated to landscape and vice versa. I do this by returning YES in shouldAutorotateToInterfaceOrientation
3) one the device is put into new orientation mode I animate view transitions (hide tabBarController view and fade in cover flow view) in function willRotateToInterfaceOrientation
This all works fine. The only thing that bothers me is when I change device orientation the tabBarController starts to autorotate it's orientation. I don't want that. How do I disable this autorotation?
I tried to do it by returning NO in shouldAutorotateToInterfaceOrientation but then the other method - willRotateToInterfaceOrientation is never called where I do my view transition animation.
Here are the main questions:
1) are the above methods right to do this kind of effect,. if yes how do I disable autorotation of tabBarController?
2) should I rely on accelerometer data to find out when device changes it's orientation and do the view transition there?
Thanks for helping.
PS: if you don't understand what I'm trying to do, run an iPod app on your iPhone and rotate the device from portrait to landscape orientation. What happens is tabBarConroller view fades out and cover flow view fades in and vice versa.
|