我有一个应用程序,它有一个标签栏控制器和标签栏控制器内的一些导航控制器。我通过扩展选项卡栏并实现 shouldAutoRotateOnOrientation Change 方法并为我希望显示允许自动旋转的特定视图控制器返回 YES 来自定义选项卡栏。在我以编程方式更改选项卡栏的 selectedIndex 之前,这工作正常。一旦我更改了选项卡栏的 selectedIndex,选项卡栏控制器的 shouldAutoRotateOnOrientation 更改方法就会停止被调用。您能说一下可能是什么问题吗?当我更改选项卡栏的 selectedIndex 时,shouldAutoRotate 方法是否被传递给其他一些视图控制器对象?
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?
发布评论
评论(1)
您确定要在 tabBarController 中更改的 selectedIndex 对应于您希望允许自动旋转的视图控制器吗?
Are you sure that the selectedIndex you are changing in the tabBarController corresponds to a View Controller that you wish to allow auto rotation?.