现在的位置: 首页 > 综合 > 正文

UITabBarController 获得selecdIndex

2018年02月02日 ⁄ 综合 ⁄ 共 461字 ⁄ 字号 评论关闭

UITabBarControllerDelegate

mainTabBarController.delegate = self;

- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController
*)viewController

{

   
switch (tabBarController.selectedIndex) {

       
case 0:///周边

            [self
SetLFMBtnList_ZB];

           
break;

       
case 1:////秀秀

           
break;

       
case 2://关注

            [self
SetLFMBtnList_GZ];

           
break;

       
case 3://设置

            

           
break;

       
case 4://活动

            

           
break;

            

       
default:

           
break;

    }

}

抱歉!评论已关闭.