How to switch to a tabbar item in the “More” View?

后端 未结 2 1191
小蘑菇
小蘑菇 2021-01-28 23:07

I\'m programming an app in objective c for Iphone/Ipad. I have some items in the \"more\" of the tabbar. I want to switch to one of those views. How can i do it? Normally i woul

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-28 23:35

    [myTabBarController setSelectedViewController: viewControllerThatYouNeed];
    

    Edit:

    Try to use selectedViewController property of UITabBarController. From Apple Docs:

    Blockquote In iOS 3.0 and later, you can use this property to select any of the view controllers in the viewControllers property. This includes view controllers that are managed by the More navigation controller and whose tab bar items are not visible in the tab bar.

提交回复
热议问题