Showing
3 changed files
with
13 additions
and
0 deletions
| ... | @@ -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,12 +134,24 @@ import UIKit | ... | @@ -133,12 +134,24 @@ 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 { |
| 139 | setupUI(with: couponData) | 141 | setupUI(with: couponData) |
| 140 | } | 142 | } |
| 141 | } | 143 | } |
| 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 | + } | ||
| 142 | 155 | ||
| 143 | public override func viewDidLayoutSubviews() { | 156 | public override func viewDidLayoutSubviews() { |
| 144 | super.viewDidLayoutSubviews() | 157 | super.viewDidLayoutSubviews() | ... | ... |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment