我正在使用Storyboarding,我有一个带有3个标签的标签栏控制器。我可以设置标签栏项目的图像。 我无法弄清楚如何使用故事板来做到这一点。
答案 0 :(得分:1)
UITabBar *tabBar = self.tabBar;
UITabBarItem *targetTabBarItem = [[tabbar items] objectAtIndex:0]; // whichever tab-item
UIImage *selectedIcon = [UIImage imageNamed:@"name-of-selected-image.png"];
[targetTabBarItem setSelectedImage:selectedIcon];