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

后端 未结 2 1189
小蘑菇
小蘑菇 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:38

    To select view controller from more screen you should select more view controller first as it displayed in previous answer:

    [tabBarController setSelectedViewController: [tabBarController moreNavigationController]]
    

    And then perform pushViewController method for more view controller

    [[tabBarController moreNavigationController] pushViewController:neededViewController animated:NO]
    

    Or use the better way:

    [tabBarController setSelectedViewController: neededViewController ]
    

提交回复
热议问题