问题现象:
2018-02-24 14:17:32.518 WeiBo[6691:205592] button text attributes only respected for UIControlStateNormal, UIControlStateSelected and UIControlStateDisabled. state = 1 is interpreted as UIControlStateSelected.
vc.tabBarItem.setTitleTextAttributes([NSAttributedStringKey.foregroundColor: .orange],
for: .highlighted)
改为:
vc.tabBarItem.setTitleTextAttributes([NSAttributedStringKey.foregroundColor: .orange],
for: .selected)
网友评论