iPhone sdk tab bar auto rotate on orientation change

好久不见. 提交于 2020-01-06 06:44:02

问题


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:


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



来源:https://stackoverflow.com/questions/2111638/iphone-sdk-tab-bar-auto-rotate-on-orientation-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!