I am using UIBarButtonItem and I am setting this for rightBarButtonItem and I am setting TitleTextAttributes to custom color but button color is not showing and it showing in light gray color. I am enabling and disabling the bar button when I enable it should show in custom color.
this is working fine below ios13 after ios13 it is not working, I did not change any code but I don't know why it is not working, it is not working thought the project, please find the image attached.
, I am using Swift 4 and Xcode 10.3.
Thanks for the quick response.
my code is :
var doneButton: UIBarButtonItem!
doneButton = UIBarButtonItem.init(title: "Select", style: .plain, target: self, action: #selector(doneButtonAction))
doneButton.setTitleTextAttributes([.foregroundColor: Colors.red], for: .normal)
self.navigationItem.rightBarButtonItem = doneButton
doneButton.isEnabled = false
if selctedTagArray.count == 0 {
//it barbutton color should change to red
self.doneButton.isEnabled = true
}