-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TabsController - tabItem colors for states. #860
Comments
I can add this with the delegation calls. |
+100 |
i do this on viewdidload |
Please find this feature available in the latest Material 2.12.0 release. Example: tabBar.setColor(Color.grey.base, for: .normal)
tabBar.setColor(Color.blue.base, for: .selected) Thank you @mohpor for the initial version, it really helped with laying down the groundwork :) |
@DanielDahan I think Previously I would setup colours as follows: override func prepare() {
super.prepare()
// Setup tab bar items appearance:
self.viewControllers.forEach { (vc) in
vc.tabItem.titleLabel?.font = UIFont.sparkyFont(.calibri, weight: .bold, size: 14)
vc.tabItem.setTitleColor(UIColor.cs_Thunder(),for: .normal)
vc.tabItem.setTitleColor(UIColor.cs_Citron(), for: .highlighted)
vc.tabItem.setTitleColor(UIColor.cs_Citron(), for: .selected)
}
} However, now |
@markst yeah, we can make that adjustment. |
Adding this suggestion #916 (comment) |
@markst I opted out of using tabBar.setLineColor(Color.orange.base, for: .selected)
tabBar.setTabItemsColor(Color.grey.base, for: .normal)
tabBar.setTabItemsColor(Color.purple.base, for: .selected)
tabBar.setTabItemsColor(Color.green.base, for: .highlighted) This is available in Material 2.12.2. |
@DanielDahan Thank you! |
By the way, I was using the tabBar delegate to change title colors for (de)selected states accordingly.
Shouldn't be there something like
selectedTabItemTitleColor
andnormalTabItemTitleColor
. ?The text was updated successfully, but these errors were encountered: