HomePageViewController *first = [[HomePageViewControlleralloc]
init];
first.tabBarItem = [[UITabBarItemalloc]
initWithTitle:@"首页"image:aImage
selectedImage:nil];
UINavigationController *nav1= [[UINavigationController
alloc]initWithRootViewController:first];
// 2种设置tabbar上的图片的方法:
first.tabBarItem = [[UITabBarItemalloc]
initWithTitle:@"首页"image:aImage
selectedImage:nil];
first.tabBarController.tabBar.selectedItem.selectedImage =
[UIImage imageNamed:@"shouye_sel.png"];
// 设置点击颜色//重要 (ios8)
nav1.tabBarController.tabBar.tintColor = [UIColorblackColor];
时间: 2024-10-01 05:01:00