1.根据下标索引以及控制器索引显示需要显示的控制器
self
.
selectedIndex
= sender.
tag
-
100
;
self
.
selectedViewController
= VC;
2.设置标签控制器下面的文字(这里是设置系统自带的Item)
firstVC.
tabBarItem
.
title
=
@"firstVC"
;
3.设置背景颜色
self
.
tabBar
.
barTintColor
= [
UIColor
redColor
];
4.设置系统样式图标
UITabBarItem
*tBarItem = [[
UITabBarItem
alloc
]
initWithTabBarSystemItem
:
UITabBarSystemItemTopRated
tag
:
100
];