NetNewsWire/iOS/Add/SelectComboTableViewCell.swift

32 lines
741 B
Swift
Raw Normal View History

2020-04-23 04:44:26 -05:00
//
// SelectComboTableViewCell.swift
// NetNewsWire-iOS
//
// Created by Maurice Parker on 4/23/20.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import UIKit
final class SelectComboTableViewCell: VibrantTableViewCell {
2020-04-23 04:44:26 -05:00
@IBOutlet weak var icon: UIImageView!
@IBOutlet weak var label: UILabel!
2025-01-22 22:18:09 -08:00
2020-04-23 04:44:26 -05:00
override func updateVibrancy(animated: Bool) {
super.updateVibrancy(animated: animated)
2025-01-22 22:18:09 -08:00
let iconTintColor = isHighlighted || isSelected ? AppColor.vibrantText : UIColor.label
2020-10-22 18:56:33 -05:00
if animated {
UIView.animate(withDuration: Self.duration) {
self.icon.tintColor = iconTintColor
}
} else {
2020-04-23 04:44:26 -05:00
self.icon.tintColor = iconTintColor
}
2025-01-22 22:18:09 -08:00
2020-04-23 04:44:26 -05:00
updateLabelVibrancy(label, color: labelColor, animated: animated)
}
2025-01-22 22:18:09 -08:00
2020-04-23 04:44:26 -05:00
}