Manos Chorianopoulos

refactor WalletViewController part 2

......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -8,10 +8,77 @@
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) {
......@@ -19,5 +86,11 @@ import UIKit
// 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)
}
}
......
......@@ -8,10 +8,32 @@
import UIKit
@objc public class WalletVouchersBannerTableViewCell: UITableViewCell {
@IBOutlet weak var sectionTitleLabel: UILabel!
@IBOutlet weak var voucherBannerView: UIView!
@IBOutlet weak var voucherBannerIconImage: UIImageView!
@IBOutlet weak var voucherBannerLabel: UILabel!
@IBOutlet weak var voucherBannerArrowImage: UIImageView!
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
sectionTitleLabel.text = "Υπόλοιπο επιδότησης"
voucherBannerView.layer.cornerRadius = 16.0
voucherBannerView.layer.borderWidth = 1
voucherBannerView.layer.borderColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00).cgColor
// Add shadow
voucherBannerView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
voucherBannerView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
voucherBannerView.layer.shadowOpacity = 1.0
voucherBannerView.layer.shadowRadius = 1.0
voucherBannerIconImage.image = UIImage(named: "wallet_voucher", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
voucherBannerArrowImage.image = UIImage(named: "arrow_right_black", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
voucherBannerLabel.text = "Ενημερώσου για το υπόλοιπο επιδότησης"
}
public override func setSelected(_ selected: Bool, animated: Bool) {
......