美文网首页
iOS 之 UITabBar 设置标题 Console 提示:

iOS 之 UITabBar 设置标题 Console 提示:

作者: willokyes | 来源:发表于2018-02-24 14:19 被阅读0次

问题现象:

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)

相关文章

网友评论

      本文标题:iOS 之 UITabBar 设置标题 Console 提示:

      本文链接:https://www.haomeiwen.com/subject/ymvqxftx.html