UIBarButtonItem is disabled, but has normal color

前端 未结 6 1196
失恋的感觉
失恋的感觉 2021-02-12 19:25

I\'m having an issue with a UIBarButtonItem. I use the appearance proxy to set its color for states Normal and Disabled and I do this in t

6条回答
  •  攒了一身酷
    2021-02-12 20:03

    Swift 4

    If someone looking for how to change barbuttonitem disabled state appearance in swift. Here you go.

    barButtonItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.lightGray], for: .disabled)
    

提交回复
热议问题