NetNewsWire/iOS/UIKit Extensions/VibrantTableViewCell.swift
2019-10-22 03:31:25 -05:00

36 lines
845 B
Swift

//
// VibrantTableViewCell.swift
// NetNewsWire-iOS
//
// Created by Jim Correia on 9/2/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import UIKit
class VibrantTableViewCell: UITableViewCell {
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
commonInit()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
commonInit()
}
private func commonInit() {
applyThemeProperties()
}
/// Subclass overrides should call super
func applyThemeProperties() {
let selectedBackgroundView = UIView(frame: .zero)
selectedBackgroundView.backgroundColor = AppAssets.secondaryAccentColor
self.selectedBackgroundView = selectedBackgroundView
textLabel?.highlightedTextColor = AppAssets.vibrantTextColor
}
}