Manos Chorianopoulos

MapViewController part2

......@@ -125,6 +125,7 @@ import UIKit
mapButton.setTitleColor(UIColor(rgb: 0xFFFFFF), for: .highlighted)
mapButton.layer.cornerRadius = mapButton.bounds.height / 2
mapButton.backgroundColor = UIColor(rgb: 0x00A3E0)
mapButton.addTarget(self, action: #selector(mapButtonTapped), for: .touchUpInside)
websiteButton.titleLabel?.font = UIFont(name: "PingLCG-Regular", size: 16)
// websiteButton.setTitle("Δες το website", for: .normal)
......@@ -133,6 +134,7 @@ import UIKit
websiteButton.setTitleColor(UIColor(rgb: 0x002430), for: .highlighted)
websiteButton.backgroundColor = UIColor(rgb: 0xDDEFFB)
websiteButton.layer.cornerRadius = websiteButton.bounds.height / 2
websiteButton.addTarget(self, action: #selector(websiteButtonTapped), for: .touchUpInside)
// Configure the view with coupon data
if let couponData = coupon {
......@@ -140,6 +142,17 @@ import UIKit
}
}
@objc private func mapButtonTapped() {
let vc = SwiftWarplyFramework.MapViewController(nibName: "MapViewController", bundle: Bundle.frameworkBundle)
vc.coupon = coupon
self.navigationController?.pushViewController(vc, animated: true)
}
@objc private func websiteButtonTapped() {
// TODO
}
public override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
mapButton.layer.cornerRadius = mapButton.bounds.height / 2
......