Fix faded vibrant text. Issue #1186

This commit is contained in:
Maurice Parker
2019-10-28 13:56:46 -05:00
parent b0d40afa3c
commit cf8d1ee457
3 changed files with 25 additions and 9 deletions

View File

@@ -23,12 +23,13 @@ class VibrantButton: UIButton {
private func commonInit() {
setTitleColor(AppAssets.vibrantTextColor, for: .highlighted)
let disabledColor = AppAssets.secondaryAccentColor.withAlphaComponent(0.5)
setTitleColor(disabledColor, for: .disabled)
}
override var isHighlighted: Bool {
didSet {
backgroundColor = isHighlighted ? backgroundHighlightColor : nil
titleLabel?.alpha = 1
}
}