开发者

iPhone sdk tab bar auto rotate on orientation change

开发者 https://www.devze.com 2022-12-17 12:13 出处:网络
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 shouldAutoRotateOnOrie

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. Ca开发者_开发问答n 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号