Fix timeline secondary label coloring

This commit is contained in:
Maurice Parker
2019-11-04 11:47:44 -06:00
parent 524a7383ac
commit f138c2d9aa
4 changed files with 10 additions and 10 deletions

View File

@@ -51,18 +51,18 @@ class VibrantTableViewCell: UITableViewCell {
/// Subclass overrides should call super
func updateVibrancy(animated: Bool) {
updateLabelVibrancy(textLabel, animated: animated)
updateLabelVibrancy(detailTextLabel, animated: animated)
updateLabelVibrancy(textLabel, color: labelColor, animated: animated)
updateLabelVibrancy(detailTextLabel, color: labelColor, animated: animated)
}
func duration(animated: Bool) -> TimeInterval {
return animated ? 0.6 : 0.0
}
func updateLabelVibrancy(_ label: UILabel?, animated: Bool) {
func updateLabelVibrancy(_ label: UILabel?, color: UIColor, animated: Bool) {
guard let label = label else { return }
UIView.transition(with: label, duration: duration(animated: animated), options: .transitionCrossDissolve, animations: {
label.textColor = self.labelColor
label.textColor = color
}, completion: nil)
}