Showing
7 changed files
with
48 additions
and
0 deletions
No preview for this file type
| ... | @@ -72,6 +72,14 @@ import SwiftEventBus | ... | @@ -72,6 +72,14 @@ import SwiftEventBus |
| 72 | redeemButton.setTitleColor(.white, for: .normal) | 72 | redeemButton.setTitleColor(.white, for: .normal) |
| 73 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) | 73 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) |
| 74 | redeemButton.layer.cornerRadius = 12.0 | 74 | redeemButton.layer.cornerRadius = 12.0 |
| 75 | + // Fix width for ipad | ||
| 76 | + if UIDevice.current.userInterfaceIdiom == .pad { | ||
| 77 | + // iPad | ||
| 78 | + redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true | ||
| 79 | + } else { | ||
| 80 | + // not iPad (iPhone, mac, tv, carPlay, unspecified) | ||
| 81 | + redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true | ||
| 82 | + } | ||
| 75 | 83 | ||
| 76 | } | 84 | } |
| 77 | 85 | ... | ... |
| ... | @@ -118,12 +118,28 @@ import AVFoundation | ... | @@ -118,12 +118,28 @@ import AVFoundation |
| 118 | redeemButton.setTitleColor(.white, for: .normal) | 118 | redeemButton.setTitleColor(.white, for: .normal) |
| 119 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) | 119 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) |
| 120 | redeemButton.layer.cornerRadius = 12.0 | 120 | redeemButton.layer.cornerRadius = 12.0 |
| 121 | + // Fix width for ipad | ||
| 122 | + if UIDevice.current.userInterfaceIdiom == .pad { | ||
| 123 | + // iPad | ||
| 124 | + redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true | ||
| 125 | + } else { | ||
| 126 | + // not iPad (iPhone, mac, tv, carPlay, unspecified) | ||
| 127 | + redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true | ||
| 128 | + } | ||
| 121 | 129 | ||
| 122 | mapButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) | 130 | mapButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) |
| 123 | mapButton.setTitle("Δες τα καταστήματα", for: .normal) | 131 | mapButton.setTitle("Δες τα καταστήματα", for: .normal) |
| 124 | mapButton.setTitleColor(UIColor(red: 0.31, green: 0.62, blue: 0.18, alpha: 1.00), for: .normal) | 132 | mapButton.setTitleColor(UIColor(red: 0.31, green: 0.62, blue: 0.18, alpha: 1.00), for: .normal) |
| 125 | mapButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00) | 133 | mapButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00) |
| 126 | mapButton.layer.cornerRadius = 12.0 | 134 | mapButton.layer.cornerRadius = 12.0 |
| 135 | + // Fix width for ipad | ||
| 136 | + if UIDevice.current.userInterfaceIdiom == .pad { | ||
| 137 | + // iPad | ||
| 138 | + mapButton.widthAnchor.constraint(equalToConstant: 250).isActive = true | ||
| 139 | + } else { | ||
| 140 | + // not iPad (iPhone, mac, tv, carPlay, unspecified) | ||
| 141 | + mapButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true | ||
| 142 | + } | ||
| 127 | 143 | ||
| 128 | termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16) | 144 | termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16) |
| 129 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | 145 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | ... | ... |
| ... | @@ -79,6 +79,14 @@ import SwiftEventBus | ... | @@ -79,6 +79,14 @@ import SwiftEventBus |
| 79 | redeemButton.setTitleColor(.white, for: .normal) | 79 | redeemButton.setTitleColor(.white, for: .normal) |
| 80 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) | 80 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) |
| 81 | redeemButton.layer.cornerRadius = 12.0 | 81 | redeemButton.layer.cornerRadius = 12.0 |
| 82 | + // Fix width for ipad | ||
| 83 | + if UIDevice.current.userInterfaceIdiom == .pad { | ||
| 84 | + // iPad | ||
| 85 | + redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true | ||
| 86 | + } else { | ||
| 87 | + // not iPad (iPhone, mac, tv, carPlay, unspecified) | ||
| 88 | + redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true | ||
| 89 | + } | ||
| 82 | 90 | ||
| 83 | termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) | 91 | termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) |
| 84 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | 92 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -99,6 +99,14 @@ import SwiftEventBus | ... | @@ -99,6 +99,14 @@ import SwiftEventBus |
| 99 | redeemButton.setTitleColor(.white, for: .normal) | 99 | redeemButton.setTitleColor(.white, for: .normal) |
| 100 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) | 100 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) |
| 101 | redeemButton.layer.cornerRadius = 12.0 | 101 | redeemButton.layer.cornerRadius = 12.0 |
| 102 | + // Fix width for ipad | ||
| 103 | + if UIDevice.current.userInterfaceIdiom == .pad { | ||
| 104 | + // iPad | ||
| 105 | + redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true | ||
| 106 | + } else { | ||
| 107 | + // not iPad (iPhone, mac, tv, carPlay, unspecified) | ||
| 108 | + redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true | ||
| 109 | + } | ||
| 102 | 110 | ||
| 103 | } | 111 | } |
| 104 | 112 | ... | ... |
| ... | @@ -92,6 +92,14 @@ import SwiftEventBus | ... | @@ -92,6 +92,14 @@ import SwiftEventBus |
| 92 | activateButton.setTitleColor(.white, for: .normal) | 92 | activateButton.setTitleColor(.white, for: .normal) |
| 93 | activateButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) | 93 | activateButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) |
| 94 | activateButton.layer.cornerRadius = 12.0 | 94 | activateButton.layer.cornerRadius = 12.0 |
| 95 | + // Fix width for ipad | ||
| 96 | + if UIDevice.current.userInterfaceIdiom == .pad { | ||
| 97 | + // iPad | ||
| 98 | + activateButton.widthAnchor.constraint(equalToConstant: 250).isActive = true | ||
| 99 | + } else { | ||
| 100 | + // not iPad (iPhone, mac, tv, carPlay, unspecified) | ||
| 101 | + activateButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true | ||
| 102 | + } | ||
| 95 | 103 | ||
| 96 | moreButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16) | 104 | moreButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16) |
| 97 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | 105 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | ... | ... |
-
Please register or login to post a comment