How can I change the text and icon colors for UITabBar and UITabBarItems in iOS 7? The default gray text seems dim and hard to read for unselected tabbar items.
相关问题
- @objc protocol crashes the swift compiler
- Getting UITableViewCell from its superview iOS 7 i
- didSelectViewController method not being called (w
- Access paging in iOS - previous and next : retriev
- Install Ad Hoc distributed app on iOS via USB, usi
相关文章
- didBeginContact:(SKPhysicsContact *)contact not in
- ios7 new pan gesture to go back in navigation stac
- IOS UICollectionview Dynamically change Cell's
- PhoneGap iOS 7 and localStorage
- Add UITextField to title view of navigation item
- Is it possible to display a SFSafariViewController
- iOS7 crashing - [__NSPlaceholderDictionary initWit
- SKStoreProductViewController rate disabled on iOS
You try it
Code free way to change text color in tab bar:
If you are just using iOS 10 then you may change the Image Tint in your Tab Bar
If you are also supporting iOS 9 and lower, then you must also add tintColor to your user definer runtime attributes in each tab bar item
if you also wish to change your icon color make sure the correct color image is in your assest folder and change Render as to Original Image
This Should Work Perfectly for iOS 8 also
For unselected tabbar item:
For selected tabbar item:
Ed's answer is perfect, but let me add one thing. TabBar is in default translucent thus affected by the color of view under the TabBar (i.e. each member viewController's view's color affects TabBar appearance.).
So I set below code not to be affected.
Together with Ed's answer here is a complete code I use now.