uitabbaritem
Image is not showing up for tab bar item
Go to Assets folder. Select your tab image. On the right side under Attributes you will find “Render As”. Select “Original Image”.
How to set tab bar item title programmatically in objective c?
You can set all the UITabBar icons in an easy way. You can do this in your viewWillAppear: method: [[self.tabBarController.tabBar.items objectAtIndex:0] setTitle:NSLocalizedString(@”BotonMapas”, @”comment”)]; [[self.tabBarController.tabBar.items objectAtIndex:1] setTitle:NSLocalizedString(@”BotonRA”, @”comment”)]; [[self.tabBarController.tabBar.items objectAtIndex:2] setTitle:NSLocalizedString(@”BotonEstado”, @”comment”)]; [[self.tabBarController.tabBar.items objectAtIndex:3] setTitle:NSLocalizedString(@”LabelInfo”, @”comment”)]; Swift 3.1 Solution self.tabBarController?.tabBar.items?[0].title = NSLocalizedString(“BotonMapas”, comment: “comment”) self.tabBarController?.tabBar.items?[1].title = NSLocalizedString(“BotonRA”, comment: “comment”) self.tabBarController?.tabBar.items?[2].title = NSLocalizedString(“BotonEstado”, comment: “comment”) self.tabBarController?.tabBar.items?[3].title = … Read more
Changing font size of tabbaritem
I recommend a better way: [yourTabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor whiteColor], UITextAttributeTextColor, [NSValue valueWithUIOffset:UIOffsetMake(0,0)], UITextAttributeTextShadowOffset, [UIFont fontWithName:@”Helvetica” size:18.0], UITextAttributeFont, nil] forState:UIControlStateNormal];
iOS 7 tabBar-line, how to remove it?
UIImage* tabBarBackground = [UIImage imageNamed:@”tabbar_bg.png”]; [[UITabBar appearance] setShadowImage:tabBarBackground]; [[UITabBar appearance] setBackgroundImage:tabBarBackground];
ios 11 UITabBar UITabBarItem positioning issue
I am maintaining a large iPad app written mostly in Objective-C that has survived several iOS releases. I ran into the situation where I needed the pre-iOS 11 tab bar appearance (with the icons above the titles instead of next to them) for a couple tab bars. My solution was to create a subclass of … Read more
How to change inactive icon/text color on tab bar?
You can also set the property Render As of your tab bar images within your asset catalog directly. There you have the option to set the property to Default, Original Image and Template Image.
Unselected UITabBar color?
In iOS 10 and higher, there are 3 possible easy solutions: A. Instance from code (Swift): self.tabBar.unselectedItemTintColor = unselectedcolor B. Instance from IB: Add a Key Path: unselectedItemTintColor of type: Color C. Global appearance (Swift): UITabBar.appearance().unselectedItemTintColor = unselectedcolor