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