使用系统的TabBar时,图片不显示

查看API:替换为iOS8下的方法


for (UITabBarItem *item in self.tabBar.items) {

 UIImage *selectedImage = [UIImage imageNamed:XXXX];
 UIImage *unselectedImage = [UIImage imageNamed:XXXX];

selectedImage = [selectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

unselectedImage = [unselectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

[item setImage:unselectedImage];

[item setSelectedImage:selectedImage];

}

你可能感兴趣的:(iOS开发笔记)