0
我正在UITabbarview控制器上工作,我用下面的代码设置了一个图像,但是在第一次打开视图时它不可见。如何在UITabbaritem上设置图像?
UIImage *prfimage = [UIImage imageNamed:@"profile_o.png"]; UITabBarItem *tbP = [[UITabBarItem alloc] initWithTitle:@"" image:prfimage tag:YES];
[self setTabBarItem:tbP];
[[UITabBar appearance] setTintColor:[UIColor colorWithRed:247/255.0f green:148/255.0f blue:29/255.0f alpha:2.0f]];
self.tabBarItem.imageInsets = UIEdgeInsetsMake(6, 0, -6, 0);
self.title = nil;
先生您好,它在我的情况下不能正常工作,出现图像时我点击它的位置,如果我再次点击比图像变焦 –