How can I change the color of \"More..\" text in tabbar to match with its icon
Swift 5.1 + iOS 12.4 & iOS 13:
/// Subclass of `UITabBarController` that is used to set certain text colors for tab bar items.
class TabBarController: UITabBarController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if let items = tabBar.items {
// Setting the title text color of all tab bar items:
for item in items {
item.setTitleTextAttributes([.foregroundColor: UIColor.black], for: .selected)
item.setTitleTextAttributes([.foregroundColor: UIColor.lightGray], for: .normal)
}
}
}
}