Skip to content

Commit 9344f83

Browse files
committed
Set background color of cells used in settings secondary tables
1 parent e83bfc6 commit 9344f83

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

WooCommerce/Classes/ViewRelated/ReusableViews/SwitchTableViewCell.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class SwitchTableViewCell: UITableViewCell {
5151
override func awakeFromNib() {
5252
super.awakeFromNib()
5353

54+
configureBackground()
5455
setupTextLabels()
5556
setupSwitch()
5657
setupGestureRecognizers()
@@ -66,6 +67,10 @@ class SwitchTableViewCell: UITableViewCell {
6667
//
6768
private extension SwitchTableViewCell {
6869

70+
func configureBackground() {
71+
applyDefaultBackgroundStyle()
72+
}
73+
6974
func setupTextLabels() {
7075
textLabel?.text = String()
7176
textLabel?.applyBodyStyle()

WooCommerce/Classes/ViewRelated/ReusableViews/TopLeftImageTableViewCell.swift

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ class TopLeftImageTableViewCell: UITableViewCell {
77
override func awakeFromNib() {
88
super.awakeFromNib()
99

10-
textLabel?.applyBodyStyle()
11-
textLabel?.numberOfLines = 0
10+
configureBackground()
11+
configureTextLabel()
1212
}
1313

1414
override func layoutSubviews() {
@@ -18,6 +18,18 @@ class TopLeftImageTableViewCell: UITableViewCell {
1818
}
1919
}
2020

21+
22+
private extension TopLeftImageTableViewCell {
23+
func configureBackground() {
24+
applyDefaultBackgroundStyle()
25+
}
26+
27+
func configureTextLabel() {
28+
textLabel?.applyBodyStyle()
29+
textLabel?.numberOfLines = 0
30+
}
31+
}
32+
2133
extension TopLeftImageTableViewCell {
2234
struct Constants {
2335
static let iconW = CGFloat(24)

WooCommerce/Classes/ViewRelated/ReusableViews/ValueOneTableViewCell.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,23 @@ class ValueOneTableViewCell: UITableViewCell {
55
override func awakeFromNib() {
66
super.awakeFromNib()
77

8+
configureBackground()
9+
configureTextLabel()
10+
configureDetailTextLabel()
11+
}
12+
}
13+
14+
15+
private extension ValueOneTableViewCell {
16+
func configureBackground() {
17+
applyDefaultBackgroundStyle()
18+
}
19+
20+
func configureTextLabel() {
821
textLabel?.applyBodyStyle()
22+
}
23+
24+
func configureDetailTextLabel() {
925
detailTextLabel?.applySubheadlineStyle()
1026
detailTextLabel?.lineBreakMode = .byWordWrapping
1127
detailTextLabel?.numberOfLines = 0

0 commit comments

Comments
 (0)