【发布时间】:2020-03-04 00:37:07
【问题描述】:
我尝试了几乎最大的解决方案,但没有帮助,选择的状态颜色正在应用,但对于正常状态,它没有应用。我只在 iOS13.2 中专门面临这个问题。
tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: tabFont,
NSAttributedString.Key.foregroundColor: UIColor.yellow],
for: .selected)
tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: tabFont,
NSAttributedString.Key.foregroundColor: UIColor.white],
for: UIControl.State.normal)
我在 plist 中禁用了暗模式。它始终显示为灰色。
【问题讨论】:
-
你试过了吗? : self.tabBar.unselectedItemTintColor = .lightGray
标签: swift ios13 swift5 xcode11.2 ios13.2