Showing
3 changed files
with
98 additions
and
37 deletions
... | @@ -258,7 +258,7 @@ | ... | @@ -258,7 +258,7 @@ |
258 | <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> | 258 | <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> |
259 | <subviews> | 259 | <subviews> |
260 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fHd-ff-Sbn"> | 260 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fHd-ff-Sbn"> |
261 | - <rect key="frame" x="17" y="23" width="380" height="513.5"/> | 261 | + <rect key="frame" x="17" y="23" width="380" height="499.5"/> |
262 | <subviews> | 262 | <subviews> |
263 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SUPERMARKET DEALS CARD" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ffU-yH-vAL"> | 263 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SUPERMARKET DEALS CARD" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ffU-yH-vAL"> |
264 | <rect key="frame" x="26" y="26" width="328" height="27"/> | 264 | <rect key="frame" x="26" y="26" width="328" height="27"/> |
... | @@ -273,16 +273,16 @@ | ... | @@ -273,16 +273,16 @@ |
273 | <nil key="highlightedColor"/> | 273 | <nil key="highlightedColor"/> |
274 | </label> | 274 | </label> |
275 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="74w-a6-uZN"> | 275 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="74w-a6-uZN"> |
276 | - <rect key="frame" x="26" y="154" width="328" height="157.5"/> | 276 | + <rect key="frame" x="18" y="73" width="344" height="157.5"/> |
277 | <subviews> | 277 | <subviews> |
278 | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="cBT-1y-9Lf"> | 278 | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="cBT-1y-9Lf"> |
279 | - <rect key="frame" x="24" y="5" width="280" height="110"/> | 279 | + <rect key="frame" x="24" y="5" width="296" height="110"/> |
280 | <constraints> | 280 | <constraints> |
281 | <constraint firstAttribute="height" constant="110" id="wRW-6H-VVs"/> | 281 | <constraint firstAttribute="height" constant="110" id="wRW-6H-VVs"/> |
282 | </constraints> | 282 | </constraints> |
283 | </imageView> | 283 | </imageView> |
284 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123456789101112" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t9R-7Y-Vtc" customClass="CopyableLabel" customModule="SwiftWarplyFramework" customModuleProvider="target"> | 284 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123456789101112" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t9R-7Y-Vtc" customClass="CopyableLabel" customModule="SwiftWarplyFramework" customModuleProvider="target"> |
285 | - <rect key="frame" x="24" y="120" width="280" height="23.5"/> | 285 | + <rect key="frame" x="24" y="120" width="296" height="23.5"/> |
286 | <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="19"/> | 286 | <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="19"/> |
287 | <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> | 287 | <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> |
288 | <nil key="highlightedColor"/> | 288 | <nil key="highlightedColor"/> |
... | @@ -300,25 +300,41 @@ | ... | @@ -300,25 +300,41 @@ |
300 | </constraints> | 300 | </constraints> |
301 | </view> | 301 | </view> |
302 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HCl-ht-lub" userLabel="CouponsValueView"> | 302 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HCl-ht-lub" userLabel="CouponsValueView"> |
303 | - <rect key="frame" x="0.0" y="348.5" width="380" height="53"/> | 303 | + <rect key="frame" x="0.0" y="250.5" width="380" height="137"/> |
304 | <subviews> | 304 | <subviews> |
305 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Έχεις κουπόνια συνολικής αξίας 30€" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zk5-FL-kMS"> | 305 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zk5-FL-kMS"> |
306 | - <rect key="frame" x="26" y="16" width="328" height="21"/> | 306 | + <rect key="frame" x="26" y="16" width="328" height="105"/> |
307 | + <string key="text">Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You.</string> | ||
307 | <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="17"/> | 308 | <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="17"/> |
308 | <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 309 | <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
309 | <nil key="highlightedColor"/> | 310 | <nil key="highlightedColor"/> |
310 | </label> | 311 | </label> |
312 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bvm-XO-0F3"> | ||
313 | + <rect key="frame" x="0.0" y="0.0" width="380" height="137"/> | ||
314 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
315 | + <state key="normal" title="Button"/> | ||
316 | + <buttonConfiguration key="configuration" style="plain" title="Button"> | ||
317 | + <color key="baseForegroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
318 | + </buttonConfiguration> | ||
319 | + <connections> | ||
320 | + <action selector="supermakrtPassButtonAction:" destination="Bfc-KW-c8g" eventType="touchUpInside" id="NZG-CU-3wg"/> | ||
321 | + </connections> | ||
322 | + </button> | ||
311 | </subviews> | 323 | </subviews> |
312 | <color key="backgroundColor" red="0.0" green="0.42745098039215684" blue="0.14901960784313725" alpha="1" colorSpace="calibratedRGB"/> | 324 | <color key="backgroundColor" red="0.0" green="0.42745098039215684" blue="0.14901960784313725" alpha="1" colorSpace="calibratedRGB"/> |
313 | <constraints> | 325 | <constraints> |
326 | + <constraint firstItem="Bvm-XO-0F3" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="top" id="5PC-jg-uWq"/> | ||
314 | <constraint firstAttribute="trailing" secondItem="Zk5-FL-kMS" secondAttribute="trailing" constant="26" id="8gj-ca-QKO"/> | 327 | <constraint firstAttribute="trailing" secondItem="Zk5-FL-kMS" secondAttribute="trailing" constant="26" id="8gj-ca-QKO"/> |
315 | <constraint firstAttribute="bottom" secondItem="Zk5-FL-kMS" secondAttribute="bottom" constant="16" id="OLu-Uk-BON"/> | 328 | <constraint firstAttribute="bottom" secondItem="Zk5-FL-kMS" secondAttribute="bottom" constant="16" id="OLu-Uk-BON"/> |
329 | + <constraint firstAttribute="bottom" secondItem="Bvm-XO-0F3" secondAttribute="bottom" id="T19-eg-TDE"/> | ||
316 | <constraint firstItem="Zk5-FL-kMS" firstAttribute="leading" secondItem="HCl-ht-lub" secondAttribute="leading" constant="26" id="Z7D-V4-kqB"/> | 330 | <constraint firstItem="Zk5-FL-kMS" firstAttribute="leading" secondItem="HCl-ht-lub" secondAttribute="leading" constant="26" id="Z7D-V4-kqB"/> |
331 | + <constraint firstAttribute="trailing" secondItem="Bvm-XO-0F3" secondAttribute="trailing" id="u13-rS-jsa"/> | ||
317 | <constraint firstItem="Zk5-FL-kMS" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="top" constant="16" id="v5u-PM-u2n"/> | 332 | <constraint firstItem="Zk5-FL-kMS" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="top" constant="16" id="v5u-PM-u2n"/> |
333 | + <constraint firstItem="Bvm-XO-0F3" firstAttribute="leading" secondItem="HCl-ht-lub" secondAttribute="leading" id="z9b-HX-CzR"/> | ||
318 | </constraints> | 334 | </constraints> |
319 | </view> | 335 | </view> |
320 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O1Z-nB-jp1"> | 336 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O1Z-nB-jp1"> |
321 | - <rect key="frame" x="0.0" y="401.5" width="380" height="112"/> | 337 | + <rect key="frame" x="0.0" y="387.5" width="380" height="112"/> |
322 | <subviews> | 338 | <subviews> |
323 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="e1L-dV-0yr"> | 339 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="e1L-dV-0yr"> |
324 | <rect key="frame" x="220" y="32" width="148" height="48"/> | 340 | <rect key="frame" x="220" y="32" width="148" height="48"/> |
... | @@ -346,23 +362,28 @@ | ... | @@ -346,23 +362,28 @@ |
346 | </subviews> | 362 | </subviews> |
347 | <color key="backgroundColor" red="0.21176470588235294" green="0.70196078431372544" blue="0.16862745098039217" alpha="1" colorSpace="calibratedRGB"/> | 363 | <color key="backgroundColor" red="0.21176470588235294" green="0.70196078431372544" blue="0.16862745098039217" alpha="1" colorSpace="calibratedRGB"/> |
348 | <constraints> | 364 | <constraints> |
349 | - <constraint firstAttribute="trailing" secondItem="74w-a6-uZN" secondAttribute="trailing" constant="26" id="Gda-fs-RTg"/> | 365 | + <constraint firstAttribute="trailing" secondItem="74w-a6-uZN" secondAttribute="trailing" constant="18" id="Gda-fs-RTg"/> |
350 | <constraint firstAttribute="trailing" secondItem="HCl-ht-lub" secondAttribute="trailing" id="J53-eS-6Fr"/> | 366 | <constraint firstAttribute="trailing" secondItem="HCl-ht-lub" secondAttribute="trailing" id="J53-eS-6Fr"/> |
351 | <constraint firstItem="HCl-ht-lub" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" id="V74-1z-3qe"/> | 367 | <constraint firstItem="HCl-ht-lub" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" id="V74-1z-3qe"/> |
352 | <constraint firstAttribute="bottom" secondItem="O1Z-nB-jp1" secondAttribute="bottom" id="VQE-kR-d20"/> | 368 | <constraint firstAttribute="bottom" secondItem="O1Z-nB-jp1" secondAttribute="bottom" id="VQE-kR-d20"/> |
353 | - <constraint firstItem="74w-a6-uZN" firstAttribute="top" secondItem="FCo-jy-FmB" secondAttribute="bottom" constant="43" id="Y4U-h7-vhS"/> | 369 | + <constraint firstItem="74w-a6-uZN" firstAttribute="top" secondItem="ffU-yH-vAL" secondAttribute="bottom" constant="20" id="Y4U-h7-vhS"/> |
354 | <constraint firstAttribute="trailing" secondItem="O1Z-nB-jp1" secondAttribute="trailing" id="a7K-Cs-70c"/> | 370 | <constraint firstAttribute="trailing" secondItem="O1Z-nB-jp1" secondAttribute="trailing" id="a7K-Cs-70c"/> |
355 | <constraint firstAttribute="trailing" secondItem="FCo-jy-FmB" secondAttribute="trailing" constant="26" id="cmO-N9-ava"/> | 371 | <constraint firstAttribute="trailing" secondItem="FCo-jy-FmB" secondAttribute="trailing" constant="26" id="cmO-N9-ava"/> |
356 | - <constraint firstItem="74w-a6-uZN" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="dgM-id-huG"/> | 372 | + <constraint firstItem="74w-a6-uZN" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="18" id="dgM-id-huG"/> |
357 | <constraint firstItem="FCo-jy-FmB" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="dtM-80-fIm"/> | 373 | <constraint firstItem="FCo-jy-FmB" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="dtM-80-fIm"/> |
358 | <constraint firstItem="ffU-yH-vAL" firstAttribute="top" secondItem="fHd-ff-Sbn" secondAttribute="top" constant="26" id="h8l-cx-6Dh"/> | 374 | <constraint firstItem="ffU-yH-vAL" firstAttribute="top" secondItem="fHd-ff-Sbn" secondAttribute="top" constant="26" id="h8l-cx-6Dh"/> |
359 | <constraint firstItem="ffU-yH-vAL" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="m6I-Tr-IxO"/> | 375 | <constraint firstItem="ffU-yH-vAL" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="m6I-Tr-IxO"/> |
360 | <constraint firstItem="O1Z-nB-jp1" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="bottom" id="mSE-RN-mKo"/> | 376 | <constraint firstItem="O1Z-nB-jp1" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="bottom" id="mSE-RN-mKo"/> |
361 | - <constraint firstItem="HCl-ht-lub" firstAttribute="top" secondItem="74w-a6-uZN" secondAttribute="bottom" constant="37" id="nH4-Uc-bF8"/> | 377 | + <constraint firstItem="HCl-ht-lub" firstAttribute="top" secondItem="74w-a6-uZN" secondAttribute="bottom" constant="20" id="nH4-Uc-bF8"/> |
362 | <constraint firstAttribute="trailing" secondItem="ffU-yH-vAL" secondAttribute="trailing" constant="26" id="o7F-J6-nRj"/> | 378 | <constraint firstAttribute="trailing" secondItem="ffU-yH-vAL" secondAttribute="trailing" constant="26" id="o7F-J6-nRj"/> |
363 | <constraint firstItem="FCo-jy-FmB" firstAttribute="top" secondItem="ffU-yH-vAL" secondAttribute="bottom" constant="16" id="r7m-We-OPk"/> | 379 | <constraint firstItem="FCo-jy-FmB" firstAttribute="top" secondItem="ffU-yH-vAL" secondAttribute="bottom" constant="16" id="r7m-We-OPk"/> |
364 | <constraint firstItem="O1Z-nB-jp1" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" id="rr3-UJ-IZH"/> | 380 | <constraint firstItem="O1Z-nB-jp1" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" id="rr3-UJ-IZH"/> |
365 | </constraints> | 381 | </constraints> |
382 | + <variation key="default"> | ||
383 | + <mask key="subviews"> | ||
384 | + <exclude reference="FCo-jy-FmB"/> | ||
385 | + </mask> | ||
386 | + </variation> | ||
366 | </view> | 387 | </view> |
367 | </subviews> | 388 | </subviews> |
368 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 389 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ... | ... |
... | @@ -96,7 +96,7 @@ import SwiftEventBus | ... | @@ -96,7 +96,7 @@ import SwiftEventBus |
96 | 96 | ||
97 | let barcodeString = "" | 97 | let barcodeString = "" |
98 | barcodeLabel.text = barcodeString | 98 | barcodeLabel.text = barcodeString |
99 | - barcodeLabel.font = UIFont(name: "PeridotPE-Regular", size: 19.0) | 99 | + barcodeLabel.font = UIFont(name: "PeridotPE-SBold", size: 19.0) |
100 | barcodeLabel.textColor = UIColor(rgb: 0x212121) | 100 | barcodeLabel.textColor = UIColor(rgb: 0x212121) |
101 | 101 | ||
102 | // if let barcodeUIImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.12)) { | 102 | // if let barcodeUIImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.12)) { |
... | @@ -110,18 +110,23 @@ import SwiftEventBus | ... | @@ -110,18 +110,23 @@ import SwiftEventBus |
110 | // barcodeImageHeight.constant = 0 | 110 | // barcodeImageHeight.constant = 0 |
111 | // } | 111 | // } |
112 | 112 | ||
113 | - let couponsValueString = "0.00" | 113 | +// let couponsValueString = "0.00" |
114 | - let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 17) ?? UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] | 114 | +// let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 17) ?? UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] |
115 | - let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Bold", size: 17) ?? UIFont.boldSystemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] | 115 | +// let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Bold", size: 17) ?? UIFont.boldSystemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] |
116 | +// | ||
117 | +// let couponsValueNormalText1 = "Με τα διαθέσιμα κουπόνια μπορείς να εξοικονομήσεις έως και " | ||
118 | +// let couponsValueBoldText = couponsValueString + "€." | ||
119 | +// | ||
120 | +// let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular) | ||
121 | +// let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold) | ||
122 | +// | ||
123 | +// couponsValueAttributedString.append(couponsValueBoldString) | ||
124 | +// couponsValueLabel.attributedText = couponsValueAttributedString | ||
116 | 125 | ||
117 | - let couponsValueNormalText1 = "Με τα διαθέσιμα κουπόνια μπορείς να εξοικονομήσεις έως και " | 126 | + couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." |
118 | - let couponsValueBoldText = couponsValueString + "€." | 127 | + couponsValueLabel.textAlignment = .left |
119 | - | 128 | + couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) |
120 | - let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular) | 129 | + couponsValueLabel.textColor = .white |
121 | - let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold) | ||
122 | - | ||
123 | - couponsValueAttributedString.append(couponsValueBoldString) | ||
124 | - couponsValueLabel.attributedText = couponsValueAttributedString | ||
125 | 130 | ||
126 | mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 16) | 131 | mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 16) |
127 | mapButton.setTitle("Δες στο χάρτη", for: .normal) | 132 | mapButton.setTitle("Δες στο χάρτη", for: .normal) |
... | @@ -194,21 +199,25 @@ import SwiftEventBus | ... | @@ -194,21 +199,25 @@ import SwiftEventBus |
194 | barcodeImageHeight.constant = 0 | 199 | barcodeImageHeight.constant = 0 |
195 | } | 200 | } |
196 | 201 | ||
197 | - let couponsValueFloat = marketPassDetails?._total_available_discount ?? 0.0 | 202 | +// let couponsValueFloat = marketPassDetails?._total_available_discount ?? 0.0 |
198 | - let couponsValueString = String(format: "%.2f", couponsValueFloat) | 203 | +// let couponsValueString = String(format: "%.2f", couponsValueFloat) |
199 | - // let couponsValueString = String(marketPassDetails?._total_available_discount ?? 0.0) | 204 | +// // let couponsValueString = String(marketPassDetails?._total_available_discount ?? 0.0) |
200 | - let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 17) ?? UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] | 205 | +// let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 17) ?? UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] |
201 | - let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Bold", size: 17) ?? UIFont.boldSystemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] | 206 | +// let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Bold", size: 17) ?? UIFont.boldSystemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] |
207 | +// | ||
208 | +// let couponsValueNormalText1 = "Με τα διαθέσιμα κουπόνια μπορείς να εξοικονομήσεις έως και " | ||
209 | +// let couponsValueBoldText = couponsValueString + "€." | ||
210 | +// | ||
211 | +// let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular) | ||
212 | +// let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold) | ||
213 | +// | ||
214 | +// couponsValueAttributedString.append(couponsValueBoldString) | ||
215 | +// couponsValueLabel.attributedText = couponsValueAttributedString | ||
202 | 216 | ||
203 | - let couponsValueNormalText1 = "Με τα διαθέσιμα κουπόνια μπορείς να εξοικονομήσεις έως και " | 217 | + couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You." |
204 | - let couponsValueBoldText = couponsValueString + "€." | ||
205 | - | ||
206 | - let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular) | ||
207 | - let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold) | ||
208 | - | ||
209 | - couponsValueAttributedString.append(couponsValueBoldString) | ||
210 | - couponsValueLabel.attributedText = couponsValueAttributedString | ||
211 | couponsValueLabel.textAlignment = .left | 218 | couponsValueLabel.textAlignment = .left |
219 | + couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0) | ||
220 | + couponsValueLabel.textColor = .white | ||
212 | 221 | ||
213 | let supermarkets: Array<swiftApi.SupermarketModel> = marketPassDetails?._supermarkets ?? [] | 222 | let supermarkets: Array<swiftApi.SupermarketModel> = marketPassDetails?._supermarkets ?? [] |
214 | 223 | ||
... | @@ -348,6 +357,10 @@ import SwiftEventBus | ... | @@ -348,6 +357,10 @@ import SwiftEventBus |
348 | // } | 357 | // } |
349 | 358 | ||
350 | // MARK: - Actions | 359 | // MARK: - Actions |
360 | + @IBAction func supermakrtPassButtonAction(_ sender: Any) { | ||
361 | + swiftApi().openSupermarketPass(self) | ||
362 | + } | ||
363 | + | ||
351 | @IBAction func mapButtonAction(_ sender: Any) { | 364 | @IBAction func mapButtonAction(_ sender: Any) { |
352 | swiftApi().openSupermarketMap(self) | 365 | swiftApi().openSupermarketMap(self) |
353 | } | 366 | } | ... | ... |
... | @@ -9405,6 +9405,33 @@ public class swiftApi { | ... | @@ -9405,6 +9405,33 @@ public class swiftApi { |
9405 | } | 9405 | } |
9406 | } | 9406 | } |
9407 | 9407 | ||
9408 | + public func getMarketPassUrl() -> String { | ||
9409 | + let appUuid = swiftApi().getAppUuid() | ||
9410 | + if (appUuid == "f83dfde1145e4c2da69793abb2f579af") { | ||
9411 | + return "https://dev.supermarketdeals.eu" | ||
9412 | + } else { | ||
9413 | + return "https://supermarketdeals.eu" | ||
9414 | + } | ||
9415 | + } | ||
9416 | + | ||
9417 | + public func openSupermarketPass(_ controller: UIViewController) -> Void { | ||
9418 | + let status = swiftApi().getNetworkStatus() | ||
9419 | + if (status == -1 || status == 0) { | ||
9420 | + swiftApi().showDialog(controller, "Δεν υπάρχει σύνδεση","Αυτή τη στιγμή βρίσκεσαι εκτός σύνδεσης. Παρακαλούμε βεβαιώσου ότι είσαι συνδεδεμένος στο διαδίκτυο και προσπάθησε ξανά.") | ||
9421 | + | ||
9422 | + } else { | ||
9423 | + let tempCampaign = CampaignItemModel() | ||
9424 | + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | ||
9425 | + let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! SwiftWarplyFramework.CampaignViewController | ||
9426 | + let url = swiftApi().getMarketPassUrl() | ||
9427 | + let params = swiftApi().constructCampaignParams(tempCampaign) | ||
9428 | + vc.campaignUrl = url | ||
9429 | + vc.params = params | ||
9430 | + vc.showHeader = false | ||
9431 | + controller.navigationController?.pushViewController(vc, animated: true) | ||
9432 | + } | ||
9433 | + } | ||
9434 | + | ||
9408 | 9435 | ||
9409 | /* | 9436 | /* |
9410 | { | 9437 | { | ... | ... |
-
Please register or login to post a comment