mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Add icon next to accounts in the Settings listing. Issue #1160
This commit is contained in:
30
iOS/Settings/SettingsAccountTableViewCell.swift
Normal file
30
iOS/Settings/SettingsAccountTableViewCell.swift
Normal 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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user