Showing
4 changed files
with
33 additions
and
6 deletions
No preview for this file type
This diff is collapsed. Click to expand it.
... | @@ -25,20 +25,22 @@ import AVFoundation | ... | @@ -25,20 +25,22 @@ import AVFoundation |
25 | 25 | ||
26 | termsTextView.delegate = self | 26 | termsTextView.delegate = self |
27 | 27 | ||
28 | - mapButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 17) | 28 | + mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 17) |
29 | mapButton.setTitle("Δες τα supermarket", for: .normal) | 29 | mapButton.setTitle("Δες τα supermarket", for: .normal) |
30 | mapButton.setTitleColor(UIColor(red: 1.00, green: 1.00, blue: 1.00, alpha: 1.00), for: .normal) | 30 | mapButton.setTitleColor(UIColor(red: 1.00, green: 1.00, blue: 1.00, alpha: 1.00), for: .normal) |
31 | mapButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00) | 31 | mapButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00) |
32 | mapButton.layer.cornerRadius = 15.0 | 32 | mapButton.layer.cornerRadius = 15.0 |
33 | - mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 50) | 33 | + mapButton.frame = CGRect(x: 0.0, y: 0.0, width: 260, height: 55) |
34 | - mapButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25) | 34 | +// mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 50) |
35 | +// mapButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25) | ||
35 | 36 | ||
36 | cancelButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 17) | 37 | cancelButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 17) |
37 | - cancelButton.setTitle("Ακύρωση ενιαίου κουπονιού", for: .normal) | 38 | + cancelButton.setTitle("Ακυρωση κουπονιού", for: .normal) // Ακύρωση ενιαίου κουπονιού |
38 | cancelButton.setTitleColor(UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00), for: .normal) | 39 | cancelButton.setTitleColor(UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00), for: .normal) |
39 | cancelButton.layer.cornerRadius = 15.0 | 40 | cancelButton.layer.cornerRadius = 15.0 |
40 | - cancelButton.frame = CGRect(x: 0.0, y: 0.0, width: cancelButton.intrinsicContentSize.width, height: 50) | 41 | + cancelButton.frame = CGRect(x: 0.0, y: 0.0, width: 260, height: 55) |
41 | - cancelButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25) | 42 | +// cancelButton.frame = CGRect(x: 0.0, y: 0.0, width: cancelButton.intrinsicContentSize.width, height: 50) |
43 | +// cancelButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25) | ||
42 | cancelButton.backgroundColor = .clear | 44 | cancelButton.backgroundColor = .clear |
43 | cancelButton.layer.borderWidth = 2 | 45 | cancelButton.layer.borderWidth = 2 |
44 | cancelButton.layer.borderColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00).cgColor | 46 | cancelButton.layer.borderColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00).cgColor | ... | ... |
... | @@ -26,6 +26,8 @@ import AVFoundation | ... | @@ -26,6 +26,8 @@ import AVFoundation |
26 | @IBOutlet weak var barcodeLabelHeight: NSLayoutConstraint! | 26 | @IBOutlet weak var barcodeLabelHeight: NSLayoutConstraint! |
27 | @IBOutlet weak var showBarcodeButton: UIButton! | 27 | @IBOutlet weak var showBarcodeButton: UIButton! |
28 | @IBOutlet weak var expirationLabel: UILabel! | 28 | @IBOutlet weak var expirationLabel: UILabel! |
29 | + @IBOutlet weak var expirationLabelHeight: NSLayoutConstraint! | ||
30 | + @IBOutlet weak var expirationLabelTopSpace: NSLayoutConstraint! | ||
29 | @IBOutlet weak var borderViewHeight: NSLayoutConstraint! | 31 | @IBOutlet weak var borderViewHeight: NSLayoutConstraint! |
30 | @IBOutlet weak var borderView2Height: NSLayoutConstraint! | 32 | @IBOutlet weak var borderView2Height: NSLayoutConstraint! |
31 | @IBOutlet weak var border1TopSpace: NSLayoutConstraint! | 33 | @IBOutlet weak var border1TopSpace: NSLayoutConstraint! |
... | @@ -35,6 +37,9 @@ import AVFoundation | ... | @@ -35,6 +37,9 @@ import AVFoundation |
35 | @IBOutlet weak var showBarcodeButtonHeight: NSLayoutConstraint! | 37 | @IBOutlet weak var showBarcodeButtonHeight: NSLayoutConstraint! |
36 | @IBOutlet weak var showBarcodeButtonTopSpace: NSLayoutConstraint! | 38 | @IBOutlet weak var showBarcodeButtonTopSpace: NSLayoutConstraint! |
37 | @IBOutlet weak var showCouponsButton: UIButton! | 39 | @IBOutlet weak var showCouponsButton: UIButton! |
40 | + @IBOutlet weak var topExpirationView: UIView! | ||
41 | + @IBOutlet weak var topExpirationLabel: UILabel! | ||
42 | + @IBOutlet weak var barcodeTitleLabel: UILabel! | ||
38 | 43 | ||
39 | let uiscreen: CGRect = UIScreen.main.bounds | 44 | let uiscreen: CGRect = UIScreen.main.bounds |
40 | 45 | ||
... | @@ -55,6 +60,23 @@ import AVFoundation | ... | @@ -55,6 +60,23 @@ import AVFoundation |
55 | couponImageHeight.constant = 222 // 255 //230 // 253 // self.uiscreen.height * 0.25 | 60 | couponImageHeight.constant = 222 // 255 //230 // 253 // self.uiscreen.height * 0.25 |
56 | 61 | ||
57 | nameLabel.text = "Εκπτωτικό κουπόνι COSMOTE SUPERMARKET DEALS!" | 62 | nameLabel.text = "Εκπτωτικό κουπόνι COSMOTE SUPERMARKET DEALS!" |
63 | + | ||
64 | + topExpirationView.backgroundColor = UIColor(rgb: 0xB8E0EF) | ||
65 | + topExpirationView.layer.cornerRadius = 13.0 | ||
66 | + | ||
67 | + topExpirationLabel.font = UIFont(name: "PeridotPE-Bold", size: 13) | ||
68 | + topExpirationLabel.textColor = UIColor(rgb: 0x004B87) | ||
69 | + | ||
70 | + // Hide bottom expirationLabel ==> | ||
71 | + expirationLabel.isHidden = true | ||
72 | + expirationLabelHeight.constant = CGFloat(0) | ||
73 | + expirationLabelTopSpace.constant = CGFloat(0) | ||
74 | + // === | ||
75 | + | ||
76 | + barcodeTitleLabel.text = "barcode κουπονιού" | ||
77 | + barcodeTitleLabel.font = UIFont(name: "PeridotPE-Bold", size: 16) | ||
78 | + barcodeTitleLabel.textColor = UIColor(rgb: 0x212121) | ||
79 | + | ||
58 | discriptionLabel.text = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών." | 80 | discriptionLabel.text = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών." |
59 | 81 | ||
60 | merchantDescrTextView.text = "" | 82 | merchantDescrTextView.text = "" |
... | @@ -199,8 +221,11 @@ import AVFoundation | ... | @@ -199,8 +221,11 @@ import AVFoundation |
199 | // if let earliestExpiration = coupon?._coupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) { | 221 | // if let earliestExpiration = coupon?._coupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) { |
200 | if let latestExpiration = coupon?._coupons.max(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) { | 222 | if let latestExpiration = coupon?._coupons.max(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) { |
201 | expirationLabel.text = "Το κουπόνι ισχύει έως " + (latestExpiration.expiration ?? "") | 223 | expirationLabel.text = "Το κουπόνι ισχύει έως " + (latestExpiration.expiration ?? "") |
224 | + topExpirationLabel.text = "Ισχύει έως " + (latestExpiration.expiration ?? "") | ||
225 | + topExpirationLabel.frame.size.width = topExpirationLabel.intrinsicContentSize.width | ||
202 | } else { | 226 | } else { |
203 | expirationLabel.text = "" | 227 | expirationLabel.text = "" |
228 | + topExpirationLabel.text = "" | ||
204 | } | 229 | } |
205 | 230 | ||
206 | toggleCoupons(couponsVisible: couponsVisible) | 231 | toggleCoupons(couponsVisible: couponsVisible) | ... | ... |
-
Please register or login to post a comment