Added NNWTableViewCell; a base class for cells with the NNW selection color.

Defined a semantic color for the selection color which is identical to
netNewsWireBlue.

MasterFeedTableViewCell and MasterTimelineTableViewCell now subclass
NNWTableViewCell and no longer directly customize their selected background
view.
This commit is contained in:
Jim Correia
2019-09-02 19:02:07 -07:00
parent b768877e23
commit 932f6fdd30
6 changed files with 92 additions and 20 deletions

View File

@@ -9,7 +9,7 @@
import UIKit
import RSCore
class MasterTimelineTableViewCell: UITableViewCell {
class MasterTimelineTableViewCell: NNWTableViewCell {
private let titleView = MasterTimelineTableViewCell.multiLineUILabel()
private let summaryView = MasterTimelineTableViewCell.multiLineUILabel()
@@ -124,7 +124,6 @@ private extension MasterTimelineTableViewCell {
func commonInit() {
theme()
addAccessoryView()
addSubviewAtInit(titleView, hidden: false)
addSubviewAtInit(summaryView, hidden: true)
@@ -136,12 +135,6 @@ private extension MasterTimelineTableViewCell {
}
func theme() {
let bgView = UIView()
bgView.backgroundColor = AppAssets.netNewsWireBlueColor
selectedBackgroundView = bgView
}
func addAccessoryView() {
accessoryView = UIImageView(image: AppAssets.chevronRightImage)
}