Showing
1 changed file
with
50 additions
and
6 deletions
... | @@ -126,10 +126,32 @@ import SwiftEventBus | ... | @@ -126,10 +126,32 @@ import SwiftEventBus |
126 | // couponsValueAttributedString.append(couponsValueBoldString) | 126 | // couponsValueAttributedString.append(couponsValueBoldString) |
127 | // couponsValueLabel.attributedText = couponsValueAttributedString | 127 | // couponsValueLabel.attributedText = couponsValueAttributedString |
128 | 128 | ||
129 | - couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." | 129 | + // ====== |
130 | + | ||
131 | + // couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." | ||
132 | + // couponsValueLabel.textAlignment = .left | ||
133 | + // couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) | ||
134 | + // couponsValueLabel.textColor = .white | ||
135 | + | ||
136 | + // ====== | ||
137 | + | ||
138 | + let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 13) ?? UIFont.systemFont(ofSize: 12), NSAttributedString.Key.foregroundColor: UIColor.white] | ||
139 | + 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] | ||
140 | + | ||
141 | + let couponsValueNormalText1 = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου και κέρδισε έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα προϊόντα με εκπτωτικό κουπόνι στο " | ||
142 | + let couponsValueBoldText = "For You" | ||
143 | + let couponsValueNormalText2 = "." | ||
144 | + | ||
145 | + let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular) | ||
146 | + let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold) | ||
147 | + let couponsValueNormalString2 = NSMutableAttributedString(string: couponsValueNormalText2, attributes:attrRegular) | ||
148 | + | ||
149 | + couponsValueAttributedString.append(couponsValueBoldString) | ||
150 | + couponsValueAttributedString.append(couponsValueNormalString2) | ||
151 | + couponsValueLabel.attributedText = couponsValueAttributedString | ||
130 | couponsValueLabel.textAlignment = .left | 152 | couponsValueLabel.textAlignment = .left |
131 | - couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) | 153 | + |
132 | - couponsValueLabel.textColor = .white | 154 | + // ====== |
133 | 155 | ||
134 | mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 16) | 156 | mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 16) |
135 | mapButton.setTitle("Δες στο χάρτη", for: .normal) | 157 | mapButton.setTitle("Δες στο χάρτη", for: .normal) |
... | @@ -238,10 +260,32 @@ import SwiftEventBus | ... | @@ -238,10 +260,32 @@ import SwiftEventBus |
238 | couponsValueAttributedString.append(couponsValueBoldString) | 260 | couponsValueAttributedString.append(couponsValueBoldString) |
239 | couponsValueLabel.attributedText = couponsValueAttributedString | 261 | couponsValueLabel.attributedText = couponsValueAttributedString |
240 | 262 | ||
241 | - couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." | 263 | + // ====== |
264 | + | ||
265 | + // couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." | ||
266 | + // couponsValueLabel.textAlignment = .left | ||
267 | + // couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) | ||
268 | + // couponsValueLabel.textColor = .white | ||
269 | + | ||
270 | + // ====== | ||
271 | + | ||
272 | + let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 13) ?? UIFont.systemFont(ofSize: 12), NSAttributedString.Key.foregroundColor: UIColor.white] | ||
273 | + 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] | ||
274 | + | ||
275 | + let couponsValueNormalText1 = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου και κέρδισε έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα προϊόντα με εκπτωτικό κουπόνι στο " | ||
276 | + let couponsValueBoldText = "For You" | ||
277 | + let couponsValueNormalText2 = "." | ||
278 | + | ||
279 | + let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular) | ||
280 | + let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold) | ||
281 | + let couponsValueNormalString2 = NSMutableAttributedString(string: couponsValueNormalText2, attributes:attrRegular) | ||
282 | + | ||
283 | + couponsValueAttributedString.append(couponsValueBoldString) | ||
284 | + couponsValueAttributedString.append(couponsValueNormalString2) | ||
285 | + couponsValueLabel.attributedText = couponsValueAttributedString | ||
242 | couponsValueLabel.textAlignment = .left | 286 | couponsValueLabel.textAlignment = .left |
243 | - couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) | 287 | + |
244 | - couponsValueLabel.textColor = .white | 288 | + // ====== |
245 | 289 | ||
246 | // let formattedCost = couponsValueString.replacingOccurrences(of: ".", with: ",") | 290 | // let formattedCost = couponsValueString.replacingOccurrences(of: ".", with: ",") |
247 | // couponsValueLabel.isAccessibilityElement = true | 291 | // couponsValueLabel.isAccessibilityElement = true | ... | ... |
-
Please register or login to post a comment