Xcode 提示记录

2017-06-05  本文已影响0人  文瑶906
button text attributes only respected for UIControlStateNormal, UIControlStateSelected, UIControlStateFocused, and UIControlStateDisabled. state = 1 is interpreted as UIControlStateSelected.

把 下发代码中的 ".highlighted" 改成 ".selected"

 // 4. 设置tabbar 的标题字体(大小)
        vc.tabBarItem.setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.orange], for: .highlighted)

// 改成:
vc.tabBarItem.setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.orange], for: .selected)

上一篇 下一篇

猜你喜欢

热点阅读