今天有些郁闷啊,因为很长时间没有用过TabbarContoller了,想要实现修改一下Tabbar的默认tabbaritem,本来有一个属性(selectedIndex)就可以直接修改的,但是由于它存在一个位置的关系,搞了半天没有效果,最后终于发现了,它存在一个顺序的问题,给自己一个警戒!
_tabBarController = [[BaseTabBarController alloc]init];
_tabBarController.delegate = self;
_tabBarController.viewControllers = @[leftNav,centerNav,rightNav];//注意顺序
_tabBarController.selectedIndex = 1;