Change disabled color of reader view button to match other bar button items when disabled

This commit is contained in:
Maurice Parker 2019-09-27 12:12:12 -05:00
parent 08f7e6d1a4
commit 79e7653619
1 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,14 @@ class ArticleExtractorButton: UIButton {
super.init(coder: coder) super.init(coder: coder)
} }
override var isEnabled: Bool {
didSet {
if isEnabled != oldValue {
tintColor = isEnabled ? nil : UIColor.secondaryLabel
}
}
}
var buttonState: ArticleExtractorButtonState = .off { var buttonState: ArticleExtractorButtonState = .off {
didSet { didSet {
if buttonState != oldValue { if buttonState != oldValue {