Update label animations to match cell selection fading and changed table animation speeds to 1.5. Issue #1237

This commit is contained in:
Maurice Parker
2019-11-02 19:57:01 -05:00
parent fd1eb77d88
commit 8fb87a7c87
11 changed files with 97 additions and 100 deletions

View File

@@ -34,35 +34,23 @@ class MasterTimelineTableViewCell: VibrantTableViewCell {
commonInit()
}
override func applyThemeProperties() {
super.applyThemeProperties()
let highlightedTextColor = AppAssets.vibrantTextColor
titleView.highlightedTextColor = highlightedTextColor
summaryView.highlightedTextColor = highlightedTextColor
dateView.highlightedTextColor = highlightedTextColor
feedNameView.highlightedTextColor = highlightedTextColor
backgroundColor = AppAssets.timelineBackgroundColor
}
override var frame: CGRect {
didSet {
setNeedsLayout()
}
}
override func setHighlighted(_ highlighted: Bool, animated: Bool) {
super.setHighlighted(highlighted, animated: animated)
unreadIndicatorView.isSelected = isHighlighted || isSelected
override func updateVibrancy(animated: Bool) {
updateLabelVibrancy(titleView, animated: animated)
updateLabelVibrancy(summaryView, animated: animated)
updateLabelVibrancy(dateView, animated: animated)
updateLabelVibrancy(feedNameView, animated: animated)
UIView.animate(withDuration: duration(animated: animated)) {
self.unreadIndicatorView.isSelected = self.isHighlighted || self.isSelected
}
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
unreadIndicatorView.isSelected = isHighlighted || isSelected
}
override func sizeThatFits(_ size: CGSize) -> CGSize {
let layout = updatedLayout(width: size.width)
return CGSize(width: size.width, height: layout.height)