
How can I change the color of \"More..\" text in tabbar to match with its icon
This is the swift version :-
for item in self.mainTabBar.items! {
let unselectedItem: NSDictionary = [NSForegroundColorAttributeName: UIColor.whiteColor()]
let selectedItem: NSDictionary = [NSForegroundColorAttributeName: UIColor.whiteColor()]
item.setTitleTextAttributes(unselectedItem as? [String : AnyObject], forState: .Normal)
item.setTitleTextAttributes(selectedItem as? [String : AnyObject], forState: .Selected)
}
Or you can simply change in Appdelegate :-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.blueColor()], forState: .Selected)
UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.blackColor()], forState: .Normal)
// Override point for customization after application launch.
return true
}