AnalysisHeaderViewCell.swift
935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// AnalysisHeaderViewCell.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 18/7/22.
//
import UIKit
class AnalysisHeaderViewCell: UITableViewCell {
// attributes
@IBOutlet weak var itemImage: UIImageView!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var emptyLabel: UILabel!
// lifecycle
override func awakeFromNib() {
super.awakeFromNib()
// image
itemImage.image = UIImage(named: "ic_gift_circle", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
// title
titleLabel.textColor = UIColor(rgb: 0x435563)
titleLabel.text = "Αναλυτικά:"
}
}
extension AnalysisHeaderViewCell {
func configureCell(isEmpty: Bool) {
if (isEmpty == true) {
emptyLabel.isHidden = false
} else {
emptyLabel.isHidden = true
}
}
}