// 使用原始图片
img = [img imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
// 设置选中后的图片
tabBarController.tabBar.selectedItem.selectedImage = img;
// 设置tabBarItem图片居中
for (UITabBarItem * item in self.tabBarController.tabBar.items)
for (UITabBarItem * item in self.tabBarController.tabBar.items)
{
item.imageInsets = UIEdgeInsetsMake(5, 0, -5, 0);
item.imageInsets = UIEdgeInsetsMake(5, 0, -5, 0);
}