// // AddAttachmentTableViewCell.swift // Tusker // // Created by Shadowfacts on 3/13/20. // Copyright © 2020 Shadowfacts. All rights reserved. // import UIKit class AddAttachmentTableViewCell: UITableViewCell { @IBOutlet weak var iconImageView: UIImageView! @IBOutlet weak var label: UILabel! override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) let imageName: String if traitCollection.userInterfaceStyle == .dark { imageName = "photo.fill" } else { imageName = "photo" } iconImageView.image = UIImage(systemName: imageName) } func setEnabled(_ enabled: Bool) { let color = enabled ? UIColor.systemBlue : .systemGray iconImageView.tintColor = color label.textColor = color } }