Showing
2 changed files
with
1 additions
and
705 deletions
... | @@ -2913,9 +2913,6 @@ | ... | @@ -2913,9 +2913,6 @@ |
2913 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1tN-9F-yxg" userLabel="Main View"> | 2913 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1tN-9F-yxg" userLabel="Main View"> |
2914 | <rect key="frame" x="0.0" y="48" width="414" height="848"/> | 2914 | <rect key="frame" x="0.0" y="48" width="414" height="848"/> |
2915 | <subviews> | 2915 | <subviews> |
2916 | - <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupons_scrollview_white" translatesAutoresizingMaskIntoConstraints="NO" id="Leh-kL-DF1"> | ||
2917 | - <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> | ||
2918 | - </imageView> | ||
2919 | <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="1" estimatedSectionFooterHeight="-1" contentViewInsetsToSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jsn-Je-71G"> | 2916 | <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="1" estimatedSectionFooterHeight="-1" contentViewInsetsToSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jsn-Je-71G"> |
2920 | <rect key="frame" x="0.0" y="0.0" width="414" height="848"/> | 2917 | <rect key="frame" x="0.0" y="0.0" width="414" height="848"/> |
2921 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 2918 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
... | @@ -3355,263 +3352,14 @@ | ... | @@ -3355,263 +3352,14 @@ |
3355 | <outlet property="delegate" destination="kZo-uj-MVp" id="Gfo-Do-Bkw"/> | 3352 | <outlet property="delegate" destination="kZo-uj-MVp" id="Gfo-Do-Bkw"/> |
3356 | </connections> | 3353 | </connections> |
3357 | </tableView> | 3354 | </tableView> |
3358 | - <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="F2x-ch-ng3"> | ||
3359 | - <rect key="frame" x="0.0" y="5" width="414" height="847"/> | ||
3360 | - <subviews> | ||
3361 | - <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="h6B-3P-USu"> | ||
3362 | - <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> | ||
3363 | - <subviews> | ||
3364 | - <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jbu-lq-22w"> | ||
3365 | - <rect key="frame" x="0.0" y="0.0" width="414" height="200"/> | ||
3366 | - <constraints> | ||
3367 | - <constraint firstAttribute="height" constant="200" id="qtq-sH-2GF"/> | ||
3368 | - </constraints> | ||
3369 | - </imageView> | ||
3370 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Εκπτωτικό κουπόνι COSMOTE SuperMarket Deals!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XEh-1k-bk7"> | ||
3371 | - <rect key="frame" x="20" y="220" width="374" height="34"/> | ||
3372 | - <fontDescription key="fontDescription" name="BTCosmo-Bold" family="BTCosmo" pointSize="17"/> | ||
3373 | - <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> | ||
3374 | - <nil key="highlightedColor"/> | ||
3375 | - </label> | ||
3376 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z1U-JG-k4U"> | ||
3377 | - <rect key="frame" x="20" y="269" width="374" height="51"/> | ||
3378 | - <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="16"/> | ||
3379 | - <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> | ||
3380 | - <nil key="highlightedColor"/> | ||
3381 | - </label> | ||
3382 | - <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b5L-BJ-bRd" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework"> | ||
3383 | - <rect key="frame" x="20" y="335" width="374" height="0.0"/> | ||
3384 | - <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
3385 | - <constraints> | ||
3386 | - <constraint firstAttribute="height" id="Vf5-mh-mYl"/> | ||
3387 | - </constraints> | ||
3388 | - <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> | ||
3389 | - <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="16"/> | ||
3390 | - <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> | ||
3391 | - </textView> | ||
3392 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Κωδικός κουπονιού" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wB5-TH-zF6"> | ||
3393 | - <rect key="frame" x="20" y="370" width="374" height="17"/> | ||
3394 | - <fontDescription key="fontDescription" name="PeridotPE-Bold" family="Peridot PE" pointSize="17"/> | ||
3395 | - <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> | ||
3396 | - <nil key="highlightedColor"/> | ||
3397 | - </label> | ||
3398 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p9P-ZR-ZC2" userLabel="Coupon View"> | ||
3399 | - <rect key="frame" x="152.5" y="397" width="109.5" height="55"/> | ||
3400 | - <subviews> | ||
3401 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bz3-cq-84d" customClass="CopyableLabel" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
3402 | - <rect key="frame" x="20" y="13.5" width="69.5" height="28"/> | ||
3403 | - <fontDescription key="fontDescription" name="PeridotPE-Bold" family="Peridot PE" pointSize="24"/> | ||
3404 | - <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> | ||
3405 | - <nil key="highlightedColor"/> | ||
3406 | - </label> | ||
3407 | - </subviews> | ||
3408 | - <color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.95294117647058818" alpha="1" colorSpace="calibratedRGB"/> | ||
3409 | - <constraints> | ||
3410 | - <constraint firstAttribute="height" constant="55" id="1EO-q8-orQ"/> | ||
3411 | - <constraint firstAttribute="trailing" secondItem="Bz3-cq-84d" secondAttribute="trailing" constant="20" id="HXC-0E-aSK"/> | ||
3412 | - <constraint firstItem="Bz3-cq-84d" firstAttribute="leading" secondItem="p9P-ZR-ZC2" secondAttribute="leading" constant="20" id="cs2-FC-J3v"/> | ||
3413 | - <constraint firstItem="Bz3-cq-84d" firstAttribute="centerY" secondItem="p9P-ZR-ZC2" secondAttribute="centerY" id="lQQ-qR-UUi"/> | ||
3414 | - </constraints> | ||
3415 | - </view> | ||
3416 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ke2-PF-MgG" userLabel="Border View"> | ||
3417 | - <rect key="frame" x="20" y="472" width="374" height="1"/> | ||
3418 | - <color key="backgroundColor" red="0.90196078430000004" green="0.90196078430000004" blue="0.90196078430000004" alpha="1" colorSpace="calibratedRGB"/> | ||
3419 | - <constraints> | ||
3420 | - <constraint firstAttribute="height" constant="1" id="TtB-Ap-gwZ"/> | ||
3421 | - </constraints> | ||
3422 | - </view> | ||
3423 | - <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0e4-jR-gJ2"> | ||
3424 | - <rect key="frame" x="30" y="483" width="354" height="110"/> | ||
3425 | - <constraints> | ||
3426 | - <constraint firstAttribute="height" constant="110" id="aLi-ff-Zln"/> | ||
3427 | - </constraints> | ||
3428 | - </imageView> | ||
3429 | - <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="KcC-nd-UJt"> | ||
3430 | - <rect key="frame" x="20" y="603" width="374" height="26.5"/> | ||
3431 | - <constraints> | ||
3432 | - <constraint firstAttribute="height" constant="26.5" id="9mu-aR-zqX"/> | ||
3433 | - </constraints> | ||
3434 | - <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="23"/> | ||
3435 | - <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
3436 | - <nil key="highlightedColor"/> | ||
3437 | - </label> | ||
3438 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HK5-Qt-OFZ" userLabel="Border 2 View"> | ||
3439 | - <rect key="frame" x="20" y="644.5" width="374" height="1"/> | ||
3440 | - <color key="backgroundColor" red="0.90196078430000004" green="0.90196078430000004" blue="0.90196078430000004" alpha="1" colorSpace="calibratedRGB"/> | ||
3441 | - <constraints> | ||
3442 | - <constraint firstAttribute="height" constant="1" id="cnC-Ua-jhC"/> | ||
3443 | - </constraints> | ||
3444 | - </view> | ||
3445 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l3Z-rd-1se"> | ||
3446 | - <rect key="frame" x="103.5" y="655.5" width="207" height="50"/> | ||
3447 | - <constraints> | ||
3448 | - <constraint firstAttribute="height" constant="50" id="oi1-xW-7Ma"/> | ||
3449 | - </constraints> | ||
3450 | - <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="16"/> | ||
3451 | - <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="5" maxY="0.0"/> | ||
3452 | - <state key="normal" title="Εμφάνιση barcode" image="ic_down_dark"> | ||
3453 | - <color key="titleColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
3454 | - <preferredSymbolConfiguration key="preferredSymbolConfiguration"/> | ||
3455 | - </state> | ||
3456 | - <connections> | ||
3457 | - <action selector="showBarcodeAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="PKS-vX-Eqy"/> | ||
3458 | - </connections> | ||
3459 | - </button> | ||
3460 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Το κουπόνι ισχύει έως 05/12/2022" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bmm-wl-752"> | ||
3461 | - <rect key="frame" x="20" y="740.5" width="374" height="15"/> | ||
3462 | - <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="15"/> | ||
3463 | - <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> | ||
3464 | - <nil key="highlightedColor"/> | ||
3465 | - </label> | ||
3466 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zaj-yW-yxb"> | ||
3467 | - <rect key="frame" x="103.5" y="790.5" width="207" height="50"/> | ||
3468 | - <constraints> | ||
3469 | - <constraint firstAttribute="height" constant="50" id="t7m-Bz-eEx"/> | ||
3470 | - </constraints> | ||
3471 | - <fontDescription key="fontDescription" name="PeridotPE-Bold" family="Peridot PE" pointSize="15"/> | ||
3472 | - <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="5" maxY="0.0"/> | ||
3473 | - <state key="normal" title="Εμφάνιση κουπονιών" image="ic_down_dark"> | ||
3474 | - <color key="titleColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> | ||
3475 | - <preferredSymbolConfiguration key="preferredSymbolConfiguration"/> | ||
3476 | - </state> | ||
3477 | - <connections> | ||
3478 | - <action selector="showCouponsButtonAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="tU8-LY-Jau"/> | ||
3479 | - </connections> | ||
3480 | - </button> | ||
3481 | - <button opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NYi-ps-hZw"> | ||
3482 | - <rect key="frame" x="139.5" y="1110.5" width="135" height="44"/> | ||
3483 | - <constraints> | ||
3484 | - <constraint firstAttribute="height" constant="44" id="ERH-et-F0E"/> | ||
3485 | - </constraints> | ||
3486 | - <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="16"/> | ||
3487 | - <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> | ||
3488 | - <state key="normal" title="Δες τα καταστήματα"> | ||
3489 | - <color key="titleColor" red="0.31372549020000001" green="0.61960784310000006" blue="0.1843137255" alpha="1" colorSpace="calibratedRGB"/> | ||
3490 | - </state> | ||
3491 | - <connections> | ||
3492 | - <action selector="mapButtonAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="LNC-9q-ejl"/> | ||
3493 | - </connections> | ||
3494 | - </button> | ||
3495 | - <button opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qEo-pP-n0h"> | ||
3496 | - <rect key="frame" x="103.5" y="1174.5" width="207" height="50"/> | ||
3497 | - <constraints> | ||
3498 | - <constraint firstAttribute="height" constant="50" id="Noz-pm-Rmy"/> | ||
3499 | - </constraints> | ||
3500 | - <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/> | ||
3501 | - <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="5" maxY="0.0"/> | ||
3502 | - <state key="normal" title="Όροι χρήσης" image="ic_down_dark"> | ||
3503 | - <color key="titleColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
3504 | - <preferredSymbolConfiguration key="preferredSymbolConfiguration"/> | ||
3505 | - </state> | ||
3506 | - <connections> | ||
3507 | - <action selector="termsButtonAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="jTa-Ty-qFn"/> | ||
3508 | - </connections> | ||
3509 | - </button> | ||
3510 | - <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XRd-W8-YCf" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework"> | ||
3511 | - <rect key="frame" x="20" y="1234.5" width="374" height="0.0"/> | ||
3512 | - <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
3513 | - <constraints> | ||
3514 | - <constraint firstAttribute="height" id="kUA-53-MNE"/> | ||
3515 | - </constraints> | ||
3516 | - <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/> | ||
3517 | - <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/> | ||
3518 | - <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> | ||
3519 | - </textView> | ||
3520 | - </subviews> | ||
3521 | - <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
3522 | - <constraints> | ||
3523 | - <constraint firstItem="p9P-ZR-ZC2" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="h6B-3P-USu" secondAttribute="leading" constant="25" id="007-bh-Mq1"/> | ||
3524 | - <constraint firstAttribute="trailing" secondItem="HK5-Qt-OFZ" secondAttribute="trailing" constant="20" id="0Gv-bT-WxV"/> | ||
3525 | - <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="p9P-ZR-ZC2" secondAttribute="trailing" constant="25" id="1bd-sw-OGt"/> | ||
3526 | - <constraint firstAttribute="trailing" secondItem="XRd-W8-YCf" secondAttribute="trailing" constant="20" id="4sc-JD-hZm"/> | ||
3527 | - <constraint firstItem="Bmm-wl-752" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="54t-tD-9yM"/> | ||
3528 | - <constraint firstAttribute="trailing" secondItem="Ke2-PF-MgG" secondAttribute="trailing" constant="20" id="5uX-Lg-16f"/> | ||
3529 | - <constraint firstItem="qEo-pP-n0h" firstAttribute="width" secondItem="h6B-3P-USu" secondAttribute="width" multiplier="0.5" id="6Qm-94-CbZ"/> | ||
3530 | - <constraint firstAttribute="trailing" secondItem="Bmm-wl-752" secondAttribute="trailing" constant="20" id="74j-fN-F1a"/> | ||
3531 | - <constraint firstItem="jbu-lq-22w" firstAttribute="top" secondItem="h6B-3P-USu" secondAttribute="top" id="77S-EB-I9n"/> | ||
3532 | - <constraint firstItem="wB5-TH-zF6" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="7Xp-Hh-b7M"/> | ||
3533 | - <constraint firstItem="XRd-W8-YCf" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="Bjx-ym-XLB"/> | ||
3534 | - <constraint firstItem="qEo-pP-n0h" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="CKS-XP-QAN"/> | ||
3535 | - <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="qEo-pP-n0h" secondAttribute="bottom" constant="30" id="E3K-lI-LCA"/> | ||
3536 | - <constraint firstItem="0e4-jR-gJ2" firstAttribute="top" secondItem="Ke2-PF-MgG" secondAttribute="bottom" constant="10" id="FeW-6g-7nZ"/> | ||
3537 | - <constraint firstItem="p9P-ZR-ZC2" firstAttribute="top" secondItem="wB5-TH-zF6" secondAttribute="bottom" constant="10" id="G0T-2t-BKh"/> | ||
3538 | - <constraint firstItem="KcC-nd-UJt" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="GE8-CX-1fl"/> | ||
3539 | - <constraint firstItem="NYi-ps-hZw" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="GwJ-8P-npS"/> | ||
3540 | - <constraint firstItem="XEh-1k-bk7" firstAttribute="top" secondItem="jbu-lq-22w" secondAttribute="bottom" constant="30" id="HCb-Uz-CQC"/> | ||
3541 | - <constraint firstItem="XEh-1k-bk7" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="HRC-XR-2Z2"/> | ||
3542 | - <constraint firstItem="Bmm-wl-752" firstAttribute="top" secondItem="l3Z-rd-1se" secondAttribute="bottom" constant="10" id="HbV-nu-Hpt"/> | ||
3543 | - <constraint firstAttribute="trailing" secondItem="0e4-jR-gJ2" secondAttribute="trailing" constant="30" id="HxT-Ci-qXC"/> | ||
3544 | - <constraint firstItem="zaj-yW-yxb" firstAttribute="width" secondItem="h6B-3P-USu" secondAttribute="width" multiplier="0.5" id="Jak-kG-SlN"/> | ||
3545 | - <constraint firstItem="l3Z-rd-1se" firstAttribute="top" secondItem="HK5-Qt-OFZ" secondAttribute="bottom" constant="10" id="LiN-pJ-pjN"/> | ||
3546 | - <constraint firstAttribute="trailing" secondItem="KcC-nd-UJt" secondAttribute="trailing" constant="20" id="Mfx-q9-cuK"/> | ||
3547 | - <constraint firstItem="XRd-W8-YCf" firstAttribute="top" secondItem="qEo-pP-n0h" secondAttribute="bottom" constant="10" id="Nd4-Gg-uk1"/> | ||
3548 | - <constraint firstItem="HK5-Qt-OFZ" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="Nt2-qa-UoE"/> | ||
3549 | - <constraint firstItem="z1U-JG-k4U" firstAttribute="top" secondItem="XEh-1k-bk7" secondAttribute="bottom" constant="15" id="OK6-wa-Ybp"/> | ||
3550 | - <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="XRd-W8-YCf" secondAttribute="bottom" constant="30" id="PqJ-aK-gFO"/> | ||
3551 | - <constraint firstItem="zaj-yW-yxb" firstAttribute="top" secondItem="Bmm-wl-752" secondAttribute="bottom" constant="30" id="QYD-3G-JMi"/> | ||
3552 | - <constraint firstAttribute="trailing" secondItem="wB5-TH-zF6" secondAttribute="trailing" constant="20" id="RUA-zf-2M5"/> | ||
3553 | - <constraint firstItem="p9P-ZR-ZC2" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="Roj-dQ-hYS"/> | ||
3554 | - <constraint firstItem="KcC-nd-UJt" firstAttribute="top" secondItem="0e4-jR-gJ2" secondAttribute="bottom" constant="10" id="SH6-4R-cCp"/> | ||
3555 | - <constraint firstAttribute="trailing" secondItem="XEh-1k-bk7" secondAttribute="trailing" constant="20" id="XIz-C7-XrD"/> | ||
3556 | - <constraint firstItem="l3Z-rd-1se" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="YD9-GP-0ms"/> | ||
3557 | - <constraint firstItem="qEo-pP-n0h" firstAttribute="top" secondItem="NYi-ps-hZw" secondAttribute="bottom" constant="20" id="Zt9-R1-mr2"/> | ||
3558 | - <constraint firstItem="b5L-BJ-bRd" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="arK-Zd-Hgy"/> | ||
3559 | - <constraint firstItem="Ke2-PF-MgG" firstAttribute="top" secondItem="p9P-ZR-ZC2" secondAttribute="bottom" constant="20" id="cmv-I1-vKp"/> | ||
3560 | - <constraint firstItem="z1U-JG-k4U" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="cyH-Xu-zU6"/> | ||
3561 | - <constraint firstItem="wB5-TH-zF6" firstAttribute="top" secondItem="b5L-BJ-bRd" secondAttribute="bottom" constant="35" id="fR9-cP-N5X"/> | ||
3562 | - <constraint firstAttribute="trailing" secondItem="z1U-JG-k4U" secondAttribute="trailing" constant="20" id="ghn-UI-BtO"/> | ||
3563 | - <constraint firstAttribute="trailing" secondItem="b5L-BJ-bRd" secondAttribute="trailing" constant="20" id="iby-Dv-64i"/> | ||
3564 | - <constraint firstItem="Ke2-PF-MgG" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="jsN-8I-dDs"/> | ||
3565 | - <constraint firstAttribute="trailing" secondItem="jbu-lq-22w" secondAttribute="trailing" id="nZs-Mo-gQn"/> | ||
3566 | - <constraint firstItem="zaj-yW-yxb" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="ner-V9-uet"/> | ||
3567 | - <constraint firstItem="jbu-lq-22w" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" id="nlJ-Jr-W1y"/> | ||
3568 | - <constraint firstItem="l3Z-rd-1se" firstAttribute="width" secondItem="h6B-3P-USu" secondAttribute="width" multiplier="0.5" id="pBD-ac-8QV"/> | ||
3569 | - <constraint firstItem="HK5-Qt-OFZ" firstAttribute="top" secondItem="KcC-nd-UJt" secondAttribute="bottom" constant="15" id="sjJ-5g-cKb"/> | ||
3570 | - <constraint firstItem="0e4-jR-gJ2" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="30" id="t1y-43-ggS"/> | ||
3571 | - <constraint firstItem="b5L-BJ-bRd" firstAttribute="top" secondItem="z1U-JG-k4U" secondAttribute="bottom" constant="15" id="xxC-cP-Rv9"/> | ||
3572 | - </constraints> | ||
3573 | - </view> | ||
3574 | - </subviews> | ||
3575 | - <constraints> | ||
3576 | - <constraint firstItem="h6B-3P-USu" firstAttribute="top" secondItem="Bwm-0z-5fj" secondAttribute="top" id="0QV-nm-q49"/> | ||
3577 | - <constraint firstItem="h6B-3P-USu" firstAttribute="bottom" secondItem="Bwm-0z-5fj" secondAttribute="bottom" id="cMM-3m-nO7"/> | ||
3578 | - <constraint firstItem="h6B-3P-USu" firstAttribute="trailing" secondItem="Bwm-0z-5fj" secondAttribute="trailing" id="dHs-br-RnG"/> | ||
3579 | - <constraint firstItem="h6B-3P-USu" firstAttribute="width" secondItem="J9l-2m-hLG" secondAttribute="width" id="p3R-hD-ebm"/> | ||
3580 | - <constraint firstItem="h6B-3P-USu" firstAttribute="leading" secondItem="Bwm-0z-5fj" secondAttribute="leading" id="zDh-cb-g0k"/> | ||
3581 | - </constraints> | ||
3582 | - <viewLayoutGuide key="contentLayoutGuide" id="Bwm-0z-5fj"/> | ||
3583 | - <viewLayoutGuide key="frameLayoutGuide" id="J9l-2m-hLG"/> | ||
3584 | - </scrollView> | ||
3585 | - <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="k6Y-8d-5AX"> | ||
3586 | - <rect key="frame" x="0.0" y="420" width="414" height="11.5"/> | ||
3587 | - </imageView> | ||
3588 | </subviews> | 3355 | </subviews> |
3589 | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 3356 | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
3590 | <constraints> | 3357 | <constraints> |
3591 | - <constraint firstAttribute="bottom" secondItem="F2x-ch-ng3" secondAttribute="bottom" id="Bxi-Lf-m8N"/> | ||
3592 | - <constraint firstItem="h6B-3P-USu" firstAttribute="height" relation="greaterThanOrEqual" secondItem="1tN-9F-yxg" secondAttribute="height" id="JTm-bV-cw8"/> | ||
3593 | - <constraint firstItem="F2x-ch-ng3" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="Jos-cl-7VR"/> | ||
3594 | <constraint firstItem="Jsn-Je-71G" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="KbP-p7-cQj"/> | 3358 | <constraint firstItem="Jsn-Je-71G" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="KbP-p7-cQj"/> |
3595 | - <constraint firstItem="k6Y-8d-5AX" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="SIr-Hi-Dyx"/> | ||
3596 | - <constraint firstItem="F2x-ch-ng3" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="U0W-zW-DaZ"/> | ||
3597 | <constraint firstItem="Jsn-Je-71G" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="UYc-62-g5M"/> | 3359 | <constraint firstItem="Jsn-Je-71G" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="UYc-62-g5M"/> |
3598 | <constraint firstAttribute="trailing" secondItem="Jsn-Je-71G" secondAttribute="trailing" id="Vqx-91-Gax"/> | 3360 | <constraint firstAttribute="trailing" secondItem="Jsn-Je-71G" secondAttribute="trailing" id="Vqx-91-Gax"/> |
3599 | - <constraint firstAttribute="trailing" secondItem="F2x-ch-ng3" secondAttribute="trailing" id="fiO-e6-Uyi"/> | ||
3600 | <constraint firstAttribute="bottom" secondItem="Jsn-Je-71G" secondAttribute="bottom" id="hCl-yM-7aq"/> | 3361 | <constraint firstAttribute="bottom" secondItem="Jsn-Je-71G" secondAttribute="bottom" id="hCl-yM-7aq"/> |
3601 | - <constraint firstItem="Leh-kL-DF1" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="i78-sg-xrF"/> | ||
3602 | - <constraint firstAttribute="trailing" secondItem="k6Y-8d-5AX" secondAttribute="trailing" id="iXg-hc-zBk"/> | ||
3603 | - <constraint firstItem="Leh-kL-DF1" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="mcD-r4-3uU"/> | ||
3604 | - <constraint firstItem="k6Y-8d-5AX" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="o5b-Jd-fzM"/> | ||
3605 | - <constraint firstAttribute="trailing" secondItem="Leh-kL-DF1" secondAttribute="trailing" id="syn-qO-3hi"/> | ||
3606 | - <constraint firstAttribute="bottom" secondItem="Leh-kL-DF1" secondAttribute="bottom" id="uv2-fR-r9D"/> | ||
3607 | </constraints> | 3362 | </constraints> |
3608 | - <variation key="default"> | ||
3609 | - <mask key="subviews"> | ||
3610 | - <exclude reference="Leh-kL-DF1"/> | ||
3611 | - <exclude reference="F2x-ch-ng3"/> | ||
3612 | - <exclude reference="k6Y-8d-5AX"/> | ||
3613 | - </mask> | ||
3614 | - </variation> | ||
3615 | </view> | 3363 | </view> |
3616 | </subviews> | 3364 | </subviews> |
3617 | <viewLayoutGuide key="safeArea" id="fJk-Nc-evo"/> | 3365 | <viewLayoutGuide key="safeArea" id="fJk-Nc-evo"/> |
... | @@ -3624,41 +3372,8 @@ | ... | @@ -3624,41 +3372,8 @@ |
3624 | </constraints> | 3372 | </constraints> |
3625 | </view> | 3373 | </view> |
3626 | <connections> | 3374 | <connections> |
3627 | - <outlet property="backgroundImage" destination="Leh-kL-DF1" id="Yh4-J9-2fn"/> | ||
3628 | - <outlet property="barcodeImage" destination="0e4-jR-gJ2" id="K57-UT-nEz"/> | ||
3629 | - <outlet property="barcodeImageHeight" destination="aLi-ff-Zln" id="fmv-UO-1xh"/> | ||
3630 | - <outlet property="barcodeImageTopSpace" destination="FeW-6g-7nZ" id="geW-rH-Ncb"/> | ||
3631 | - <outlet property="barcodeLabel" destination="KcC-nd-UJt" id="nuA-M8-lfz"/> | ||
3632 | - <outlet property="barcodeLabelHeight" destination="9mu-aR-zqX" id="LkC-oC-uBB"/> | ||
3633 | - <outlet property="barcodeLabelTopSpace" destination="SH6-4R-cCp" id="Ika-Hf-UZJ"/> | ||
3634 | - <outlet property="border1TopSpace" destination="cmv-I1-vKp" id="uDK-md-rLQ"/> | ||
3635 | - <outlet property="border2TopSpace" destination="sjJ-5g-cKb" id="Irm-bW-hhb"/> | ||
3636 | - <outlet property="borderView2Height" destination="cnC-Ua-jhC" id="Sft-A8-tkZ"/> | ||
3637 | - <outlet property="borderViewHeight" destination="TtB-Ap-gwZ" id="8uH-4S-wv9"/> | ||
3638 | - <outlet property="couponImage" destination="jbu-lq-22w" id="S5m-GI-lAj"/> | ||
3639 | - <outlet property="couponImageHeight" destination="qtq-sH-2GF" id="deR-r5-eSP"/> | ||
3640 | - <outlet property="couponNumberLabel" destination="Bz3-cq-84d" id="4BL-AF-mRu"/> | ||
3641 | - <outlet property="couponView" destination="p9P-ZR-ZC2" id="eTA-tl-HKI"/> | ||
3642 | - <outlet property="discriptionLabel" destination="z1U-JG-k4U" id="svr-qs-rtD"/> | ||
3643 | - <outlet property="expirationLabel" destination="Bmm-wl-752" id="DjA-bw-ewR"/> | ||
3644 | <outlet property="mainView" destination="1tN-9F-yxg" id="57p-Ru-90A"/> | 3375 | <outlet property="mainView" destination="1tN-9F-yxg" id="57p-Ru-90A"/> |
3645 | - <outlet property="mapButton" destination="NYi-ps-hZw" id="IgR-mN-HJO"/> | ||
3646 | - <outlet property="mapButtonHeight" destination="ERH-et-F0E" id="IrJ-ng-0OU"/> | ||
3647 | - <outlet property="merchantDescrTextView" destination="b5L-BJ-bRd" id="FyS-oQ-cm4"/> | ||
3648 | - <outlet property="merchantDescrTextViewHeight" destination="Vf5-mh-mYl" id="FMX-nf-Q5b"/> | ||
3649 | - <outlet property="merchantDescrTextViewTopSpace" destination="xxC-cP-Rv9" id="2oC-LP-Qih"/> | ||
3650 | - <outlet property="nameLabel" destination="XEh-1k-bk7" id="z04-hZ-hkV"/> | ||
3651 | - <outlet property="scrollContentView" destination="h6B-3P-USu" id="MWb-in-8tj"/> | ||
3652 | - <outlet property="scrollView" destination="F2x-ch-ng3" id="dbe-Qt-LyZ"/> | ||
3653 | - <outlet property="showBarcodeButton" destination="l3Z-rd-1se" id="8M5-vy-RzO"/> | ||
3654 | - <outlet property="showBarcodeButtonHeight" destination="oi1-xW-7Ma" id="6lt-Ex-DuD"/> | ||
3655 | - <outlet property="showBarcodeButtonTopSpace" destination="LiN-pJ-pjN" id="aXh-ZZ-cWO"/> | ||
3656 | - <outlet property="showCouponsButton" destination="zaj-yW-yxb" id="gVY-xH-aMw"/> | ||
3657 | <outlet property="tableView" destination="Jsn-Je-71G" id="mZF-SD-0R2"/> | 3376 | <outlet property="tableView" destination="Jsn-Je-71G" id="mZF-SD-0R2"/> |
3658 | - <outlet property="termsButton" destination="qEo-pP-n0h" id="1QS-vK-40s"/> | ||
3659 | - <outlet property="termsTextView" destination="XRd-W8-YCf" id="Lad-5v-1WT"/> | ||
3660 | - <outlet property="termsTextViewHeight" destination="kUA-53-MNE" id="R1h-wF-gA7"/> | ||
3661 | - <outlet property="topBorderLine" destination="k6Y-8d-5AX" id="P78-tI-PAD"/> | ||
3662 | </connections> | 3377 | </connections> |
3663 | </viewController> | 3378 | </viewController> |
3664 | <placeholder placeholderIdentifier="IBFirstResponder" id="ZLv-p2-P1H" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | 3379 | <placeholder placeholderIdentifier="IBFirstResponder" id="ZLv-p2-P1H" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | ... | ... |
... | @@ -10,69 +10,9 @@ import RSBarcodes_Swift | ... | @@ -10,69 +10,9 @@ import RSBarcodes_Swift |
10 | import AVFoundation | 10 | import AVFoundation |
11 | // import SwiftEventBus | 11 | // import SwiftEventBus |
12 | 12 | ||
13 | -final class ContentSizedTableView: UITableView { | 13 | +@objc public class UnifiedCouponBarcodeViewController: UIViewController { |
14 | - override var contentSize:CGSize { | ||
15 | - didSet { | ||
16 | - invalidateIntrinsicContentSize() | ||
17 | - } | ||
18 | - } | ||
19 | - | ||
20 | - override var intrinsicContentSize:CGSize { | ||
21 | - layoutIfNeeded() | ||
22 | - return CGSize(width: UIView.noIntrinsicMetric, height: contentSize.height) | ||
23 | - } | ||
24 | -} | ||
25 | - | ||
26 | -//extension UIScrollView { | ||
27 | -// func updateContentView() { | ||
28 | -// contentSize.height = subviews.sorted(by: { $0.frame.maxY < $1.frame.maxY }).last?.frame.maxY ?? contentSize.height | ||
29 | -// } | ||
30 | -//} | ||
31 | - | ||
32 | -extension UITableView { | ||
33 | - func updateContentView() { | ||
34 | - contentSize.height = subviews.sorted(by: { $0.frame.maxY < $1.frame.maxY }).last?.frame.maxY ?? contentSize.height | ||
35 | - } | ||
36 | -} | ||
37 | - | ||
38 | -@objc public class UnifiedCouponBarcodeViewController: UIViewController, UITextViewDelegate { | ||
39 | @IBOutlet weak var mainView: UIView! | 14 | @IBOutlet weak var mainView: UIView! |
40 | - @IBOutlet weak var backgroundImage: UIImageView! | ||
41 | - @IBOutlet weak var scrollView: UIScrollView! | ||
42 | - @IBOutlet weak var scrollContentView: UIView! | ||
43 | - @IBOutlet weak var couponImage: UIImageView! | ||
44 | - @IBOutlet weak var couponImageHeight: NSLayoutConstraint! | ||
45 | - @IBOutlet weak var nameLabel: UILabel! | ||
46 | - @IBOutlet weak var discriptionLabel: UILabel! | ||
47 | - @IBOutlet weak var merchantDescrTextView: UnselectableTappableTextView! | ||
48 | - @IBOutlet weak var merchantDescrTextViewHeight: NSLayoutConstraint! | ||
49 | - @IBOutlet weak var merchantDescrTextViewTopSpace: NSLayoutConstraint! | ||
50 | - @IBOutlet weak var couponView: UIView! | ||
51 | - @IBOutlet weak var couponNumberLabel: CopyableLabel! | ||
52 | - @IBOutlet weak var barcodeImage: UIImageView! | ||
53 | - @IBOutlet weak var barcodeImageHeight: NSLayoutConstraint! | ||
54 | - @IBOutlet weak var barcodeLabel: UILabel! | ||
55 | - @IBOutlet weak var barcodeLabelHeight: NSLayoutConstraint! | ||
56 | - @IBOutlet weak var showBarcodeButton: UIButton! | ||
57 | - @IBOutlet weak var expirationLabel: UILabel! | ||
58 | - @IBOutlet weak var termsButton: UIButton! | ||
59 | - @IBOutlet weak var termsTextView: UnselectableTappableTextView! | ||
60 | - @IBOutlet weak var termsTextViewHeight: NSLayoutConstraint! | ||
61 | - @IBOutlet weak var borderViewHeight: NSLayoutConstraint! | ||
62 | - @IBOutlet weak var borderView2Height: NSLayoutConstraint! | ||
63 | - @IBOutlet weak var border1TopSpace: NSLayoutConstraint! | ||
64 | - @IBOutlet weak var barcodeImageTopSpace: NSLayoutConstraint! | ||
65 | - @IBOutlet weak var barcodeLabelTopSpace: NSLayoutConstraint! | ||
66 | - @IBOutlet weak var border2TopSpace: NSLayoutConstraint! | ||
67 | - @IBOutlet weak var mapButton: UIButton! | ||
68 | - @IBOutlet weak var topBorderLine: UIImageView! | ||
69 | - @IBOutlet weak var mapButtonHeight: NSLayoutConstraint! | ||
70 | - @IBOutlet weak var mapButtonTopSpace: NSLayoutConstraint! | ||
71 | - @IBOutlet weak var showBarcodeButtonHeight: NSLayoutConstraint! | ||
72 | - @IBOutlet weak var showBarcodeButtonTopSpace: NSLayoutConstraint! | ||
73 | @IBOutlet weak var tableView: UITableView! | 15 | @IBOutlet weak var tableView: UITableView! |
74 | - @IBOutlet weak var tableViewHeight: NSLayoutConstraint! | ||
75 | - @IBOutlet weak var showCouponsButton: UIButton! | ||
76 | 16 | ||
77 | let uiscreen: CGRect = UIScreen.main.bounds | 17 | let uiscreen: CGRect = UIScreen.main.bounds |
78 | 18 | ||
... | @@ -91,8 +31,6 @@ extension UITableView { | ... | @@ -91,8 +31,6 @@ extension UITableView { |
91 | super.viewDidLoad() | 31 | super.viewDidLoad() |
92 | 32 | ||
93 | self.hidesBottomBarWhenPushed = true | 33 | self.hidesBottomBarWhenPushed = true |
94 | - merchantDescrTextView.delegate = self | ||
95 | - termsTextView.delegate = self | ||
96 | 34 | ||
97 | tableView.delegate = self | 35 | tableView.delegate = self |
98 | tableView.dataSource = self | 36 | tableView.dataSource = self |
... | @@ -101,237 +39,6 @@ extension UITableView { | ... | @@ -101,237 +39,6 @@ extension UITableView { |
101 | setBackButton() | 39 | setBackButton() |
102 | setNavigationTitle("Εκπτωτικό κουπόνι") | 40 | setNavigationTitle("Εκπτωτικό κουπόνι") |
103 | 41 | ||
104 | - // backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | ||
105 | - backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | ||
106 | - | ||
107 | -// scrollView.clipsToBounds = true | ||
108 | -// scrollView.layer.cornerRadius = 30 | ||
109 | -// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | ||
110 | - | ||
111 | -// let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! | ||
112 | -// var aspectR: CGFloat = 0.0 | ||
113 | -// | ||
114 | -// aspectR = image.size.width/image.size.height | ||
115 | -// | ||
116 | -// topBorderLine.translatesAutoresizingMaskIntoConstraints = false | ||
117 | -// topBorderLine.image = image | ||
118 | -// topBorderLine.contentMode = .scaleAspectFill | ||
119 | -// | ||
120 | -// NSLayoutConstraint.activate([ | ||
121 | -// topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0), | ||
122 | -// topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0), | ||
123 | -// topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0), | ||
124 | -// topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), | ||
125 | -// topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | ||
126 | -// ]) | ||
127 | - | ||
128 | - // COUPONSET: desc, img_preview, name, terms | ||
129 | - // COUPON: coupon, expiration, discount, status | ||
130 | - | ||
131 | -// let couponSetData: swiftApi.CouponSetItemModel? = coupon?.couponset_data | ||
132 | - | ||
133 | -// couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache()) | ||
134 | - couponImage.image = UIImage(named: "market_bg", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | ||
135 | - couponImage.contentMode = .scaleAspectFill | ||
136 | - couponImageHeight.constant = 230 // 253 // self.uiscreen.height * 0.25 | ||
137 | - | ||
138 | - nameLabel.text = "Εκπτωτικό κουπόνι COSMOTE SuperMarket Deals!" | ||
139 | - discriptionLabel.text = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών." | ||
140 | - | ||
141 | - merchantDescrTextView.text = "" | ||
142 | - merchantDescrTextViewTopSpace.constant = CGFloat(0) | ||
143 | - merchantDescrTextViewHeight.constant = CGFloat(0) | ||
144 | - merchantDescrTextView.isHidden = true | ||
145 | - | ||
146 | -// let merchantList:Array<swiftApi.MerchantModel> = swiftApi().getMerchantList() | ||
147 | - | ||
148 | -// for merchant in merchantList { | ||
149 | -// if (merchant._uuid == couponSetData?.merchant_uuid) { | ||
150 | -// let htmlMerchDescrText = merchant._body | ||
151 | -// | ||
152 | -// if (htmlMerchDescrText != "") { | ||
153 | -// merchantDescrTextView.attributedText = htmlMerchDescrText.htmlToAttributedString | ||
154 | -// merchantDescrTextView.font = UIFont(name: "PeridotPE-Regular", size: 16) | ||
155 | -// merchantDescrTextView.textColor = UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00) | ||
156 | -// merchantDescrTextView.textAlignment = .center | ||
157 | -// merchantDescrTextView.isScrollEnabled = false | ||
158 | -// merchantDescrTextView.isUserInteractionEnabled = true | ||
159 | -// merchantDescrTextView.isEditable = false | ||
160 | -// merchantDescrTextView.isSelectable = true | ||
161 | -// merchantDescrTextView.dataDetectorTypes = [.link] | ||
162 | -// | ||
163 | -// merchantDescrTextView.isHidden = false | ||
164 | -// merchantDescrTextViewTopSpace.constant = CGFloat(15) | ||
165 | -// let targetSize = CGSize(width: merchantDescrTextView.frame.width, height: CGFloat(MAXFLOAT)) | ||
166 | -// merchantDescrTextViewHeight.constant = merchantDescrTextView.sizeThatFits(targetSize).height | ||
167 | -// } | ||
168 | -// | ||
169 | -// break; | ||
170 | -// } | ||
171 | -// } | ||
172 | - | ||
173 | - couponView.layer.cornerRadius = 16 | ||
174 | - couponNumberLabel.text = ((coupon?._code != 0) ? String(coupon?._code ?? 0) : "") | ||
175 | - couponView.frame = CGRect(x: 0.0, y: 0.0, width: couponView.intrinsicContentSize.width, height: 55) | ||
176 | - | ||
177 | - let barcodeString = constructBarcode() ?? "" | ||
178 | - barcodeLabel.text = barcodeString | ||
179 | - | ||
180 | - // Uncomment if Barcode Section is active again | ||
181 | - 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.1)) { | ||
182 | - barcodeImage.image = barcodeUIImage | ||
183 | - | ||
184 | - barcodeImageHeight.constant = self.uiscreen.height * 0.1 | ||
185 | - | ||
186 | - showBarcodeButton.isHidden = false | ||
187 | - showBarcodeButtonHeight.constant = 50 | ||
188 | - showBarcodeButtonTopSpace.constant = 10 | ||
189 | - | ||
190 | - } else { | ||
191 | - barcodeImageHeight.constant = 0 | ||
192 | - | ||
193 | - showBarcodeButton.isHidden = true | ||
194 | - showBarcodeButtonHeight.constant = 0 | ||
195 | - showBarcodeButtonTopSpace.constant = 0 | ||
196 | - } | ||
197 | - | ||
198 | - // === Hide Barcode Section | ||
199 | -// barcodeImage.isHidden = true | ||
200 | -// barcodeImageHeight.constant = CGFloat(0) | ||
201 | -// barcodeLabel.isHidden = true | ||
202 | -// barcodeLabelHeight.constant = CGFloat(0) | ||
203 | -// | ||
204 | -// borderViewHeight.constant = CGFloat(0) | ||
205 | -// borderView2Height.constant = CGFloat(0) | ||
206 | -// | ||
207 | -// border1TopSpace.constant = CGFloat(0) // 20 | ||
208 | -// barcodeImageTopSpace.constant = CGFloat(0) // 10 | ||
209 | -// barcodeLabelTopSpace.constant = CGFloat(0) // 10 | ||
210 | -// border2TopSpace.constant = CGFloat(0) // 15 | ||
211 | -// | ||
212 | - showBarcodeButton.isHidden = true | ||
213 | - showBarcodeButtonHeight.constant = 0 | ||
214 | - showBarcodeButtonTopSpace.constant = 0 | ||
215 | - // === | ||
216 | - | ||
217 | - showBarcodeButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 16) | ||
218 | - showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal) | ||
219 | - showBarcodeButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) | ||
220 | - showBarcodeButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
221 | - showBarcodeButton.semanticContentAttribute = .forceRightToLeft | ||
222 | - showBarcodeButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) | ||
223 | - showBarcodeButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); | ||
224 | - showBarcodeButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5); | ||
225 | - showBarcodeButton.imageView?.layer.transform = CATransform3DMakeScale(0.8, 0.8, 0.8) | ||
226 | - | ||
227 | - if let earliestExpiration = coupon?._coupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) { | ||
228 | - expirationLabel.text = "Το κουπόνι ισχύει έως " + (earliestExpiration.expiration ?? "") | ||
229 | - } else { | ||
230 | - expirationLabel.text = "" | ||
231 | - } | ||
232 | - | ||
233 | - mapButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18) | ||
234 | - mapButton.setTitle("Δες τα supermarket", for: .normal) | ||
235 | - mapButton.setTitleColor(UIColor(red: 1.00, green: 1.00, blue: 1.00, alpha: 1.00), for: .normal) | ||
236 | - mapButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) | ||
237 | - mapButton.layer.cornerRadius = 8.0 | ||
238 | - mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 44) | ||
239 | - mapButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16) | ||
240 | - | ||
241 | - // mapButton.isHidden = true | ||
242 | - // mapButtonHeight.constant = 0 | ||
243 | - // mapButtonTopSpace.constant = 0 | ||
244 | - | ||
245 | - // let merchantList:Array<swiftApi.MerchantModel> = swiftApi().getMerchantList() | ||
246 | - | ||
247 | - // for merchant in merchantList { | ||
248 | - // if (merchant._uuid == couponSetData?.merchant_uuid) { | ||
249 | - // if (merchant._show_map == true) { | ||
250 | - // mapButton.setTitle("Δες τα καταστήματα", for: .normal) | ||
251 | - // mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 44) | ||
252 | - // mapButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16) | ||
253 | - // mapButton.isHidden = false | ||
254 | - // mapBtnVisible = true | ||
255 | - // eshopBtnVisible = false | ||
256 | - // mapButtonHeight.constant = 44 | ||
257 | - // mapButtonTopSpace.constant = 10 | ||
258 | - // } else if (merchant._eshop == true) { | ||
259 | - // mapButton.setTitle("Δες το eshop", for: .normal) | ||
260 | - // mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 44) | ||
261 | - // mapButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16) | ||
262 | - // mapButton.isHidden = false | ||
263 | - // mapBtnVisible = false | ||
264 | - // eshopBtnVisible = true | ||
265 | - // mapButtonHeight.constant = 44 | ||
266 | - // mapButtonTopSpace.constant = 10 | ||
267 | - // } else { | ||
268 | - // mapButton.isHidden = true | ||
269 | - // mapBtnVisible = false | ||
270 | - // eshopBtnVisible = false | ||
271 | - // mapButtonHeight.constant = 0 | ||
272 | - // mapButtonTopSpace.constant = 0 | ||
273 | - // } | ||
274 | - // eshopWebsite = merchant._website | ||
275 | - // break; | ||
276 | - // } | ||
277 | - // } | ||
278 | - | ||
279 | - // Fix width for ipad | ||
280 | -// if UIDevice.current.userInterfaceIdiom == .pad { | ||
281 | -// // iPad | ||
282 | -// mapButton.widthAnchor.constraint(equalToConstant: 250).isActive = true | ||
283 | -// } else { | ||
284 | -// // not iPad (iPhone, mac, tv, carPlay, unspecified) | ||
285 | -// mapButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true | ||
286 | -// } | ||
287 | - | ||
288 | - showCouponsButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 15) | ||
289 | -// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | ||
290 | - showCouponsButton.setTitle("Εμφάνιση κουπονιών", for: .normal) | ||
291 | - showCouponsButton.setTitleColor(UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00), for: .normal) | ||
292 | - showCouponsButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
293 | - showCouponsButton.semanticContentAttribute = .forceRightToLeft | ||
294 | - showCouponsButton.tintColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 1.00) | ||
295 | - showCouponsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); | ||
296 | - showCouponsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5); | ||
297 | - showCouponsButton.imageView?.layer.transform = CATransform3DMakeScale(0.8, 0.8, 0.8) | ||
298 | - | ||
299 | -// tableView.isScrollEnabled = false | ||
300 | -// tableView.isHidden = true | ||
301 | -// tableViewHeight.constant = CGFloat(0) | ||
302 | - | ||
303 | -// tableView.isHidden = false | ||
304 | -// let targetSize = CGSize(width: tableView.frame.width, height: CGFloat(MAXFLOAT)) | ||
305 | -// tableViewHeight.constant = tableView.sizeThatFits(targetSize).height | ||
306 | - | ||
307 | - | ||
308 | - termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16) | ||
309 | -// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | ||
310 | - termsButton.setTitle("Όροι χρήσης", for: .normal) | ||
311 | - termsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) | ||
312 | - termsButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
313 | - termsButton.semanticContentAttribute = .forceRightToLeft | ||
314 | - termsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) | ||
315 | - termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); | ||
316 | - termsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5); | ||
317 | - termsButton.imageView?.layer.transform = CATransform3DMakeScale(0.8, 0.8, 0.8) | ||
318 | - | ||
319 | - let termsText = "1. Το εκπτωτικό κουπόνι ισχύει έως την ημερομηνία που αναφέρεται παραπάνω\n2. To εκπτωτικό κουπόνι αφορά στα ενεργά κουπόνια προσφορών όπως αναφέρονται παραπάνω.\n3. Το εκπτωτικό κουπόνι μπορεί να χρησιμοποιηθεί σε μια μόνο συναλλαγή.\n4. Εάν δεν γίνει χρήση ενός επιμέρους κουπονιού προσφοράς από το εκπτωτικό κουπόνι, το κουπόνι προσφοράς επιστρέφει στο καλάθι στην ενότητα COSMOTE SuperMarket Deals" | ||
320 | - termsTextView.attributedText = NSAttributedString(string: termsText) | ||
321 | - termsTextView.font = UIFont(name: "PFSquareSansPro-Regular", size: 15) | ||
322 | - termsTextView.textColor = UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00) | ||
323 | - termsTextView.textAlignment = .center | ||
324 | - termsTextView.isScrollEnabled = false | ||
325 | - | ||
326 | - termsTextView.isUserInteractionEnabled = true | ||
327 | - termsTextView.isEditable = false | ||
328 | - termsTextView.isSelectable = true | ||
329 | - termsTextView.dataDetectorTypes = [.link] | ||
330 | - | ||
331 | - // Uncomment if Barcode Section is active again | ||
332 | -// toggleTerms() | ||
333 | -// toggleBarcode() | ||
334 | - | ||
335 | // Logs | 42 | // Logs |
336 | // print("Coupon: " + (coupon?.coupon ?? "")) | 43 | // print("Coupon: " + (coupon?.coupon ?? "")) |
337 | // print("Coupon Name: " + (couponSetData?.name ?? "")) | 44 | // print("Coupon Name: " + (couponSetData?.name ?? "")) |
... | @@ -347,152 +54,26 @@ extension UITableView { | ... | @@ -347,152 +54,26 @@ extension UITableView { |
347 | 54 | ||
348 | } | 55 | } |
349 | 56 | ||
350 | - public func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool { | ||
351 | - UIApplication.shared.open(URL) | ||
352 | - | ||
353 | - // Disable `.preview` by 3D Touch and other interactions | ||
354 | - return false | ||
355 | - } | ||
356 | - | ||
357 | 57 | ||
358 | // MARK: - Functions | 58 | // MARK: - Functions |
359 | - func toggleTerms() { | ||
360 | - if (termsVisible) { | ||
361 | - termsTextView.isHidden = false | ||
362 | - let targetSize = CGSize(width: termsTextView.frame.width, height: CGFloat(MAXFLOAT)) | ||
363 | - termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height | ||
364 | - | ||
365 | - termsButton.setImage(UIImage(named: "ic_up_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
366 | - } else { | ||
367 | - termsTextView.isHidden = true | ||
368 | - termsTextViewHeight.constant = CGFloat(0) | ||
369 | - | ||
370 | - termsButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
371 | - } | ||
372 | - } | ||
373 | - | ||
374 | - func toggleBarcode() { | ||
375 | - if (barcodeVisible) { | ||
376 | - barcodeImage.isHidden = false | ||
377 | - if (barcodeImage.image == nil) { | ||
378 | - barcodeImageHeight.constant = CGFloat(0) | ||
379 | - } else { | ||
380 | - barcodeImageHeight.constant = self.uiscreen.height * 0.1 | ||
381 | - } | ||
382 | - barcodeLabel.isHidden = false | ||
383 | - let targetSize = CGSize(width: barcodeLabel.frame.width, height: CGFloat(MAXFLOAT)) | ||
384 | - barcodeLabelHeight.constant = barcodeLabel.sizeThatFits(targetSize).height | ||
385 | - | ||
386 | - borderViewHeight.constant = CGFloat(1) | ||
387 | - borderView2Height.constant = CGFloat(1) | ||
388 | - | ||
389 | - border1TopSpace.constant = CGFloat(20) // 20 | ||
390 | - barcodeImageTopSpace.constant = CGFloat(10) // 10 | ||
391 | - barcodeLabelTopSpace.constant = CGFloat(10) // 10 | ||
392 | - border2TopSpace.constant = CGFloat(15) // 15 | ||
393 | - | ||
394 | - showBarcodeButton.setTitle("Απόκρυψη barcode", for: .normal) | ||
395 | - showBarcodeButton.setImage(UIImage(named: "ic_up_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
396 | - | ||
397 | - } else { | ||
398 | - barcodeImage.isHidden = true | ||
399 | - barcodeImageHeight.constant = CGFloat(0) | ||
400 | - barcodeLabel.isHidden = true | ||
401 | - barcodeLabelHeight.constant = CGFloat(0) | ||
402 | - | ||
403 | - borderViewHeight.constant = CGFloat(0) | ||
404 | - borderView2Height.constant = CGFloat(0) | ||
405 | - | ||
406 | - border1TopSpace.constant = CGFloat(0) // 20 | ||
407 | - barcodeImageTopSpace.constant = CGFloat(0) // 10 | ||
408 | - barcodeLabelTopSpace.constant = CGFloat(0) // 10 | ||
409 | - border2TopSpace.constant = CGFloat(0) // 15 | ||
410 | - | ||
411 | - showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal) | ||
412 | - showBarcodeButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
413 | - } | ||
414 | - } | ||
415 | - | ||
416 | - func toggleCoupons() { | ||
417 | - if (couponsVisible) { | ||
418 | - tableView.isHidden = false | ||
419 | - let targetSize = CGSize(width: tableView.frame.width, height: CGFloat(MAXFLOAT)) | ||
420 | - tableViewHeight.constant = tableView.sizeThatFits(targetSize).height | ||
421 | - | ||
422 | -// tableViewHeight.constant = tableView.intrinsicContentSize.height | ||
423 | - | ||
424 | - showCouponsButton.setImage(UIImage(named: "ic_up_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
425 | - } else { | ||
426 | - tableView.isHidden = true | ||
427 | - tableViewHeight.constant = CGFloat(0) | ||
428 | - | ||
429 | - showCouponsButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
430 | - } | ||
431 | -// scrollView.contentSize = CGSizeMake(scrollView.frame.size.width, scrollView.intrinsicContentSize.height); | ||
432 | -// self.view.layoutIfNeeded() | ||
433 | -// let targetSize = CGSize(width: scrollView.frame.width, height: CGFloat(MAXFLOAT)) | ||
434 | -// tableViewHeight.constant = tableView.sizeThatFits(targetSize).height | ||
435 | - | ||
436 | -// scrollView.contentSize = CGSizeMake(scrollView.frame.size.width, CGFloat(MAXFLOAT)); | ||
437 | -// scrollView.updateContentView() | ||
438 | -// tableView.updateContentView() | ||
439 | - } | ||
440 | - | ||
441 | - func constructBarcode() -> String? { | ||
442 | - // EAN 13 barcode construction | ||
443 | -// let couponData = coupon?.couponset_data | ||
444 | - let couponString = coupon?._barcode ?? "" | ||
445 | - | ||
446 | - if (!couponString.isEmpty) { | ||
447 | - var checkDigit = 0; | ||
448 | - var result = 0; | ||
449 | - | ||
450 | - var fixedCouponCode = couponString; | ||
451 | - if (fixedCouponCode.count < 12) { | ||
452 | - let loops = 12 - fixedCouponCode.count; | ||
453 | - var zerosStr = ""; | ||
454 | - for i in 0 ..< loops { | ||
455 | - zerosStr += "0" | ||
456 | - } | ||
457 | - // fixedCouponCode = zerosStr + fixedCouponCode; | ||
458 | - fixedCouponCode = fixedCouponCode + zerosStr; | ||
459 | - } | ||
460 | - | ||
461 | - var multiplier = 3; | ||
462 | - for idx in (0 ... (fixedCouponCode.count - 1)).reversed() { | ||
463 | - let curChar = fixedCouponCode[idx]; | ||
464 | - result += (Int(curChar) ?? 0) * multiplier; | ||
465 | - multiplier = multiplier == 3 ? 1 : 3; | ||
466 | - } | ||
467 | - checkDigit = 10 - (result % 10); | ||
468 | - | ||
469 | - let barcodeStr = fixedCouponCode + String(checkDigit); | ||
470 | - return barcodeStr; | ||
471 | - } | ||
472 | - | ||
473 | - return "" | ||
474 | - } | ||
475 | 59 | ||
476 | // MARK: - Actions | 60 | // MARK: - Actions |
477 | @IBAction func showCouponsButtonAction(_ sender: Any) { | 61 | @IBAction func showCouponsButtonAction(_ sender: Any) { |
478 | couponsVisible = !couponsVisible | 62 | couponsVisible = !couponsVisible |
479 | // self.tableView.reloadSections(IndexSet(0..<2), with: .none) | 63 | // self.tableView.reloadSections(IndexSet(0..<2), with: .none) |
480 | self.tableView.reloadData() | 64 | self.tableView.reloadData() |
481 | -// toggleCoupons() | ||
482 | } | 65 | } |
483 | 66 | ||
484 | @IBAction func showBarcodeAction(_ sender: Any) { | 67 | @IBAction func showBarcodeAction(_ sender: Any) { |
485 | barcodeVisible = !barcodeVisible | 68 | barcodeVisible = !barcodeVisible |
486 | // self.tableView.reloadSections(IndexSet(integer: 0), with: .none) | 69 | // self.tableView.reloadSections(IndexSet(integer: 0), with: .none) |
487 | self.tableView.reloadData() | 70 | self.tableView.reloadData() |
488 | -// toggleBarcode() | ||
489 | } | 71 | } |
490 | 72 | ||
491 | @IBAction func termsButtonAction(_ sender: Any) { | 73 | @IBAction func termsButtonAction(_ sender: Any) { |
492 | termsVisible = !termsVisible | 74 | termsVisible = !termsVisible |
493 | // self.tableView.reloadSections(IndexSet(integer: 2), with: .none) | 75 | // self.tableView.reloadSections(IndexSet(integer: 2), with: .none) |
494 | self.tableView.reloadData() | 76 | self.tableView.reloadData() |
495 | -// toggleTerms() | ||
496 | } | 77 | } |
497 | 78 | ||
498 | @IBAction func mapButtonAction(_ sender: Any) { | 79 | @IBAction func mapButtonAction(_ sender: Any) { | ... | ... |
-
Please register or login to post a comment