views:

983

answers:

1

Hi,

I have a an application that has a tabbar controller and some navigation controllers inside the tab bar controller. I customized the tab bar by extending it and implementing the shouldAutoRotateOnOrientation Change method and returning YES for specific view controllers that I wish to show allow auto rotation. This works fine until I programatically change the selectedIndex of the tabbar. Once I change the selectedIndex of the tabbar, the tabbar controller's shouldAutoRotateOnOrientation change methods stops getting called. Can you please say what might have been the problem and is the shouldAutoRotate method being delivered to some other viewcontroller object from when I change the selectedIndex of the tabbar?

A: 

Are you sure that the selectedIndex you are changing in the tabBarController corresponds to a View Controller that you wish to allow auto rotation?.

OscarMk
I have three navigation controllers added to the tabbar controller. The first one to create, second to preview and third to send (albums). Once a user finishes creating an Album, I am taking him to preview tab which has a navigation controller and initially shows a list of created albums. When the user clicks on any of them I am showing a preview of the Album. So, the problem is once a user creates and saves an Album, I am changing the selected index to preview tab. So when ever i programatically change the selected index, the shouldAutoRotate Method in tabbar controller is not being called.
Ravi