0
点赞
收藏
分享

微信扫一扫

UITabBarController (loading...)


#pragma mark 按钮创建好, 然后创建一个 UITabbarController 让所有的按钮显示出来

通过一个数组来管理所有要显示出来的UINavigationController;


1.  tabBC.tabBar.translucent = NO;// 设置底部不透明(tabBar 高度49)

    tabBC.tabBar.barTintColor = [UIColororangeColor]; // 设置背景颜色

    tabBC.tabBar.tintColor = [UIColorcyanColor]; // 选中的颜色


    tabBC.selectedIndex = 0;// 默认选中的



2. - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {

    viewController.tabBarItem.badgeValue = nil;

}// 点击 tabBarItem之后 调用(之前不要忘记设置代理人和签订协议)



3. self.tabBC.tabBar.tintColor = [UIColor orangeColor];//选中的 UITabBarController的颜色

   self.tabBC.tabBar.barTintColor = [UIColor cyanColor];//默认的 UITabBarController的颜色



举报

相关推荐

0 条评论