CouponViewController.swift
1.55 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
//
// CouponViewController.swift
// WarplySDKFrameworkIOS
//
// Created by Manos Chorianopoulos on 5/5/22.
//
import UIKit
class CouponViewController: UIViewController {
@IBOutlet weak var mainView: UIView!
@IBOutlet weak var scrollContentView: UIView!
@IBOutlet weak var couponImageHeight: NSLayoutConstraint!
@IBOutlet weak var redeemButton: UIButton!
@IBOutlet weak var termsLabel: UILabel!
let uiscreen: CGRect = UIScreen.main.bounds
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
setBackButton()
setNavigationTitle("Εκπτωτικό κουπόνι")
mainView.clipsToBounds = true
mainView.layer.cornerRadius = 30
mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
couponImageHeight.constant = self.uiscreen.height * 0.25
redeemButton.titleLabel?.font = UIFont.systemFont(ofSize: 15, weight: .medium)
termsLabel.font = UIFont.systemFont(ofSize: 14, weight: UIFont.Weight.medium)
let tap = UITapGestureRecognizer(target: self, action: #selector(CouponViewController.termsTapFunction))
termsLabel.isUserInteractionEnabled = true
termsLabel.addGestureRecognizer(tap)
}
// MARK: - Actions
@objc func termsTapFunction(sender:UITapGestureRecognizer) {
print("Terms tapped!")
}
@IBAction func redeemButtomAction(_ sender: Any) {
print("redeem Buttom Pressed!")
}
}