Add icon next to accounts in the Settings listing. Issue #1160

This commit is contained in:
Maurice Parker
2019-10-23 10:35:53 -05:00
parent be52fde08b
commit 430a4a37bf
5 changed files with 129 additions and 10 deletions

View File

@@ -0,0 +1,30 @@
//
// SettingsAccountTableViewCell.swift
// NetNewsWire-iOS
//
// Created by Maurice Parker on 10/23/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import UIKit
class SettingsAccountTableViewCell: VibrantTableViewCell {
@IBOutlet weak var accountImage: UIImageView!
@IBOutlet weak var accountNameLabel: UILabel!
override func setHighlighted(_ highlighted: Bool, animated: Bool) {
super.setHighlighted(highlighted, animated: animated)
let tintColor = isHighlighted || isSelected ? AppAssets.vibrantTextColor : UIColor.label
accountImage?.tintColor = tintColor
accountNameLabel?.highlightedTextColor = tintColor
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
let tintColor = isHighlighted || isSelected ? AppAssets.vibrantTextColor : UIColor.label
accountImage?.tintColor = tintColor
accountNameLabel?.highlightedTextColor = tintColor
}
}