Manos Chorianopoulos

MapViewController part2

...@@ -125,6 +125,7 @@ import UIKit ...@@ -125,6 +125,7 @@ import UIKit
125 mapButton.setTitleColor(UIColor(rgb: 0xFFFFFF), for: .highlighted) 125 mapButton.setTitleColor(UIColor(rgb: 0xFFFFFF), for: .highlighted)
126 mapButton.layer.cornerRadius = mapButton.bounds.height / 2 126 mapButton.layer.cornerRadius = mapButton.bounds.height / 2
127 mapButton.backgroundColor = UIColor(rgb: 0x00A3E0) 127 mapButton.backgroundColor = UIColor(rgb: 0x00A3E0)
128 + mapButton.addTarget(self, action: #selector(mapButtonTapped), for: .touchUpInside)
128 129
129 websiteButton.titleLabel?.font = UIFont(name: "PingLCG-Regular", size: 16) 130 websiteButton.titleLabel?.font = UIFont(name: "PingLCG-Regular", size: 16)
130 // websiteButton.setTitle("Δες το website", for: .normal) 131 // websiteButton.setTitle("Δες το website", for: .normal)
...@@ -133,6 +134,7 @@ import UIKit ...@@ -133,6 +134,7 @@ import UIKit
133 websiteButton.setTitleColor(UIColor(rgb: 0x002430), for: .highlighted) 134 websiteButton.setTitleColor(UIColor(rgb: 0x002430), for: .highlighted)
134 websiteButton.backgroundColor = UIColor(rgb: 0xDDEFFB) 135 websiteButton.backgroundColor = UIColor(rgb: 0xDDEFFB)
135 websiteButton.layer.cornerRadius = websiteButton.bounds.height / 2 136 websiteButton.layer.cornerRadius = websiteButton.bounds.height / 2
137 + websiteButton.addTarget(self, action: #selector(websiteButtonTapped), for: .touchUpInside)
136 138
137 // Configure the view with coupon data 139 // Configure the view with coupon data
138 if let couponData = coupon { 140 if let couponData = coupon {
...@@ -140,6 +142,17 @@ import UIKit ...@@ -140,6 +142,17 @@ import UIKit
140 } 142 }
141 } 143 }
142 144
145 + @objc private func mapButtonTapped() {
146 + let vc = SwiftWarplyFramework.MapViewController(nibName: "MapViewController", bundle: Bundle.frameworkBundle)
147 + vc.coupon = coupon
148 +
149 + self.navigationController?.pushViewController(vc, animated: true)
150 + }
151 +
152 + @objc private func websiteButtonTapped() {
153 + // TODO
154 + }
155 +
143 public override func viewDidLayoutSubviews() { 156 public override func viewDidLayoutSubviews() {
144 super.viewDidLayoutSubviews() 157 super.viewDidLayoutSubviews()
145 mapButton.layer.cornerRadius = mapButton.bounds.height / 2 158 mapButton.layer.cornerRadius = mapButton.bounds.height / 2
......