Fixes PillButton not respecting progressTintColor under certain conditions

This commit is contained in:
Riley Testut
2023-04-04 17:28:48 -05:00
committed by Magesh K
parent e5824ddd35
commit 4b9d81cd13

View File

@@ -38,11 +38,8 @@ final class PillButton: UIButton
}
var progressTintColor: UIColor? {
get {
return self.progressView.progressTintColor
}
set {
self.progressView.progressTintColor = newValue
didSet {
self.update()
}
}
@@ -169,7 +166,7 @@ private extension PillButton
self.backgroundColor = self.tintColor.withAlphaComponent(0.15)
}
self.progressView.progressTintColor = self.tintColor
self.progressView.progressTintColor = self.progressTintColor ?? self.tintColor
// Update font after init because the original titleLabel is replaced.
self.titleLabel?.font = UIFont.boldSystemFont(ofSize: 14)