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
You have likely set the bar button item title text attributes for the .Normal
state and need to also set it for the .Disabled
state.
There are two ways to fix this, one if you are setting the title text attributes on the bar button item instance and in the other case if you use the appearance proxy.
Single instance:
saveButton.setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.grayColor()], forState: .Disabled)
Appearance proxy:
UIBarButtonItem.appearanceWhenContainedInInstancesOfClasses([MyNavigationController.self]).setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.grayColor()], forState: .Disabled)