我正在尝试在 ViewController 中更改标签栏的图像,但要显示新图像,我必须单击每个标签栏项目。
for (CustomTabBarItem *myItem in self.tabBarController.tabBar.items){
myItem.enabled = YES;
myItem.badgeValue = @"1";
UIImage *myImage = [[UIImage alloc] initWithContentsOfFile:[[DesignManager sharedManager] getPathOfFile:@"test.png"]];
*myItem.imageSelect= *myImage; // change images of each item. don't appear if I dont click on the item
}
任何人都知道我怎样才能直接显示这些图像?谢谢