Skip to content

Commit f806043

Browse files
authored
Merge pull request #33 from ecompton3/master
Sets config variable for the header background
2 parents 40e364c + 7101f8c commit f806043

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/Config.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public struct Title {
77
public static var text = localizedString("SCAN_BARCODE_TITLE")
88
public static var font = UIFont.boldSystemFont(ofSize: 17)
99
public static var color = UIColor.black
10+
public static var backgroundColor = UIColor.white
1011
}
1112

1213
public struct CloseButton {

Sources/HeaderView.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ class HeaderView: UIView {
1212
/// Title label.
1313
lazy var label: UILabel = {
1414
let label = UILabel()
15-
label.backgroundColor = UIColor.white
1615
label.text = Title.text
1716
label.font = Title.font
1817
label.textColor = Title.color
18+
label.backgroundColor = Title.backgroundColor
1919
label.numberOfLines = 1
2020
label.textAlignment = .center
21-
2221
return label
2322
}()
2423

@@ -46,7 +45,7 @@ class HeaderView: UIView {
4645
override init(frame: CGRect) {
4746
super.init(frame: frame)
4847

49-
backgroundColor = UIColor.white
48+
backgroundColor = Title.backgroundColor
5049

5150
[label, button].forEach {
5251
addSubview($0)

0 commit comments

Comments
 (0)