WalletActiveCouponsTableViewCell.swift
3.76 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//
// WalletActiveCouponsTableViewCell.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 23/10/23.
//
import UIKit
@objc public class WalletActiveCouponsTableViewCell: UITableViewCell {
@IBOutlet weak var dfyViewParent: UIView!
@IBOutlet weak var dfyView: UIView!
@IBOutlet weak var dfyImage: UIImageView!
@IBOutlet weak var dfyLabel: UILabel!
@IBOutlet weak var dfyCountView: UIView!
@IBOutlet weak var dfyCountLabel: UILabel!
@IBOutlet weak var smView: UIView!
@IBOutlet weak var smImage: UIImageView!
@IBOutlet weak var smLabel: UILabel!
@IBOutlet weak var smCountView: UIView!
@IBOutlet weak var smCountLabel: UILabel!
@IBOutlet weak var gfyView: UIView!
@IBOutlet weak var gfyImage: UIImageView!
@IBOutlet weak var gfyLabel: UILabel!
@IBOutlet weak var gfyCountView: UIView!
@IBOutlet weak var gfyCountLabel: UILabel!
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
// DFY Banner
dfyViewParent.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1.00)
dfyViewParent.layer.cornerRadius = 16.0
dfyViewParent.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
dfyViewParent.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
dfyViewParent.layer.shadowOpacity = 1.0
dfyViewParent.layer.shadowRadius = 1.0
dfyView.backgroundColor = UIColor(red: 0.46, green: 0.75, blue: 0.45, alpha: 0.05)
dfyView.layer.cornerRadius = 16.0
dfyImage.image = UIImage(named: "wallet_banner_dfy", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
dfyLabel.text = "DEALS FOR YOU"
dfyCountView.layer.cornerRadius = 4.0
dfyCountView.backgroundColor = UIColor(red: 0.92, green: 0.75, blue: 0.41, alpha: 1.00)
// SM Banner
smView.backgroundColor = UIColor(red: 1.00, green: 0.99, blue: 0.97, alpha: 1.00)
smView.layer.cornerRadius = 16.0
smView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
smView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
smView.layer.shadowOpacity = 1.0
smView.layer.shadowRadius = 1.0
smImage.image = UIImage(named: "wallet_banner_sm", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
smLabel.text = "SUPERMARKET DEALS"
smCountView.layer.cornerRadius = 4.0
smCountView.backgroundColor = UIColor(red: 0.92, green: 0.75, blue: 0.41, alpha: 1.00)
// GFY Banner
gfyView.backgroundColor = UIColor(red: 0.96, green: 0.97, blue: 0.98, alpha: 1.00)
gfyView.layer.cornerRadius = 16.0
gfyView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
gfyView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
gfyView.layer.shadowOpacity = 1.0
gfyView.layer.shadowRadius = 1.0
gfyImage.image = UIImage(named: "wallet_banner_gfy", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
gfyLabel.text = "GIFTS FOR YOU"
gfyCountView.layer.cornerRadius = 4.0
gfyCountView.backgroundColor = UIColor(red: 0.92, green: 0.75, blue: 0.41, alpha: 1.00)
}
public override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
func configureCell(dfyCount: Int, smCount: Int, gfyCount: Int) {
dfyCountLabel.text = String(dfyCount)
smCountLabel.text = String(smCount)
gfyCountLabel.text = String(gfyCount)
}
}