iphone app - detect which tab bar item was pressed

后端 未结 7 1123
我寻月下人不归
我寻月下人不归 2020-12-10 02:16

i have a tab bar based application, with more than 5 tab bar items - so i get 4 of them directly showing in the view and the rest available by selecting the \"More\" tab. Wh

相关标签:
7条回答
  • How to get title of UITabBarItem in the More section?

    - (void)tabBarController:(UITabBarController *)tabBarController 
     didSelectViewController:(UIViewController *)viewController
    {
        NSLog(@"controller class: %@", NSStringFromClass([viewController class]));
        NSLog(@"controller title: %@", viewController.title);
    
        if (viewController == tabBarController.moreNavigationController)
        {
            tabBarController.moreNavigationController.delegate = self;
        }
    }
    
    0 讨论(0)
提交回复
热议问题