Showing
1 changed file
with
50 additions
and
6 deletions
... | @@ -123,10 +123,32 @@ import SwiftEventBus | ... | @@ -123,10 +123,32 @@ import SwiftEventBus |
123 | // couponsValueAttributedString.append(couponsValueBoldString) | 123 | // couponsValueAttributedString.append(couponsValueBoldString) |
124 | // couponsValueLabel.attributedText = couponsValueAttributedString | 124 | // couponsValueLabel.attributedText = couponsValueAttributedString |
125 | 125 | ||
126 | - couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." | 126 | + // ====== |
127 | + | ||
128 | + // couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." | ||
129 | + // couponsValueLabel.textAlignment = .left | ||
130 | + // couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) | ||
131 | + // couponsValueLabel.textColor = .white | ||
132 | + | ||
133 | + // ====== | ||
134 | + | ||
135 | + let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 13) ?? UIFont.systemFont(ofSize: 12), NSAttributedString.Key.foregroundColor: UIColor.white] | ||
136 | + let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-SBold", size: 13) ?? UIFont.boldSystemFont(ofSize: 12), NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue] as [NSAttributedString.Key : Any] | ||
137 | + | ||
138 | + let couponsValueNormalText1 = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου και κέρδισε έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα προϊόντα με εκπτωτικό κουπόνι στο " | ||
139 | + let couponsValueBoldText = "For You" | ||
140 | + let couponsValueNormalText2 = "." | ||
141 | + | ||
142 | + let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular) | ||
143 | + let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold) | ||
144 | + let couponsValueNormalString2 = NSMutableAttributedString(string: couponsValueNormalText2, attributes:attrRegular) | ||
145 | + | ||
146 | + couponsValueAttributedString.append(couponsValueBoldString) | ||
147 | + couponsValueAttributedString.append(couponsValueNormalString2) | ||
148 | + couponsValueLabel.attributedText = couponsValueAttributedString | ||
127 | couponsValueLabel.textAlignment = .left | 149 | couponsValueLabel.textAlignment = .left |
128 | - couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) | 150 | + |
129 | - couponsValueLabel.textColor = .white | 151 | + // ====== |
130 | 152 | ||
131 | mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 16) | 153 | mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 16) |
132 | mapButton.setTitle("Δες στο χάρτη", for: .normal) | 154 | mapButton.setTitle("Δες στο χάρτη", for: .normal) |
... | @@ -214,10 +236,32 @@ import SwiftEventBus | ... | @@ -214,10 +236,32 @@ import SwiftEventBus |
214 | // couponsValueAttributedString.append(couponsValueBoldString) | 236 | // couponsValueAttributedString.append(couponsValueBoldString) |
215 | // couponsValueLabel.attributedText = couponsValueAttributedString | 237 | // couponsValueLabel.attributedText = couponsValueAttributedString |
216 | 238 | ||
217 | - couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." | 239 | + // ====== |
240 | + | ||
241 | + // couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." | ||
242 | + // couponsValueLabel.textAlignment = .left | ||
243 | + // couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) | ||
244 | + // couponsValueLabel.textColor = .white | ||
245 | + | ||
246 | + // ====== | ||
247 | + | ||
248 | + let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 13) ?? UIFont.systemFont(ofSize: 12), NSAttributedString.Key.foregroundColor: UIColor.white] | ||
249 | + let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-SBold", size: 13) ?? UIFont.boldSystemFont(ofSize: 12), NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue] as [NSAttributedString.Key : Any] | ||
250 | + | ||
251 | + let couponsValueNormalText1 = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου και κέρδισε έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα προϊόντα με εκπτωτικό κουπόνι στο " | ||
252 | + let couponsValueBoldText = "For You" | ||
253 | + let couponsValueNormalText2 = "." | ||
254 | + | ||
255 | + let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular) | ||
256 | + let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold) | ||
257 | + let couponsValueNormalString2 = NSMutableAttributedString(string: couponsValueNormalText2, attributes:attrRegular) | ||
258 | + | ||
259 | + couponsValueAttributedString.append(couponsValueBoldString) | ||
260 | + couponsValueAttributedString.append(couponsValueNormalString2) | ||
261 | + couponsValueLabel.attributedText = couponsValueAttributedString | ||
218 | couponsValueLabel.textAlignment = .left | 262 | couponsValueLabel.textAlignment = .left |
219 | - couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) | 263 | + |
220 | - couponsValueLabel.textColor = .white | 264 | + // ====== |
221 | 265 | ||
222 | let supermarkets: Array<swiftApi.SupermarketModel> = marketPassDetails?._supermarkets ?? [] | 266 | let supermarkets: Array<swiftApi.SupermarketModel> = marketPassDetails?._supermarkets ?? [] |
223 | 267 | ... | ... |
-
Please register or login to post a comment