Showing
6 changed files
with
986 additions
and
20 deletions
... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
7 | <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> | 7 | <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> |
8 | <dict> | 8 | <dict> |
9 | <key>orderHint</key> | 9 | <key>orderHint</key> |
10 | - <integer>1</integer> | 10 | + <integer>0</integer> |
11 | </dict> | 11 | </dict> |
12 | </dict> | 12 | </dict> |
13 | </dict> | 13 | </dict> | ... | ... |
... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
7 | <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> | 7 | <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> |
8 | <dict> | 8 | <dict> |
9 | <key>orderHint</key> | 9 | <key>orderHint</key> |
10 | - <integer>0</integer> | 10 | + <integer>1</integer> |
11 | </dict> | 11 | </dict> |
12 | </dict> | 12 | </dict> |
13 | </dict> | 13 | </dict> | ... | ... |
No preview for this file type
... | @@ -2384,13 +2384,440 @@ | ... | @@ -2384,13 +2384,440 @@ |
2384 | <!--Unified Coupon Barcode View Controller--> | 2384 | <!--Unified Coupon Barcode View Controller--> |
2385 | <scene sceneID="t9s-3l-Rx0"> | 2385 | <scene sceneID="t9s-3l-Rx0"> |
2386 | <objects> | 2386 | <objects> |
2387 | - <viewController storyboardIdentifier="UnifiedCouponBarcodeViewController" id="kZo-uj-MVp" customClass="UnifiedCouponBarcodeViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> | 2387 | + <viewController storyboardIdentifier="UnifiedCouponBarcodeViewController" hidesBottomBarWhenPushed="YES" id="kZo-uj-MVp" customClass="UnifiedCouponBarcodeViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> |
2388 | <view key="view" contentMode="scaleToFill" id="NDg-r8-0Mc"> | 2388 | <view key="view" contentMode="scaleToFill" id="NDg-r8-0Mc"> |
2389 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | 2389 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
2390 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 2390 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
2391 | - <viewLayoutGuide key="safeArea" id="fJk-Nc-evo"/> | 2391 | + <subviews> |
2392 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1tN-9F-yxg" userLabel="Main View"> | ||
2393 | + <rect key="frame" x="0.0" y="48" width="414" height="848"/> | ||
2394 | + <subviews> | ||
2395 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupons_scrollview_white" translatesAutoresizingMaskIntoConstraints="NO" id="Leh-kL-DF1"> | ||
2396 | + <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> | ||
2397 | + </imageView> | ||
2398 | + <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="F2x-ch-ng3"> | ||
2399 | + <rect key="frame" x="0.0" y="5" width="414" height="847"/> | ||
2400 | + <subviews> | ||
2401 | + <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="h6B-3P-USu"> | ||
2402 | + <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> | ||
2403 | + <subviews> | ||
2404 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jbu-lq-22w"> | ||
2405 | + <rect key="frame" x="0.0" y="0.0" width="414" height="200"/> | ||
2406 | + <constraints> | ||
2407 | + <constraint firstAttribute="height" constant="200" id="qtq-sH-2GF"/> | ||
2408 | + </constraints> | ||
2409 | + </imageView> | ||
2410 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XEh-1k-bk7"> | ||
2411 | + <rect key="frame" x="20" y="220" width="374" height="34"/> | ||
2412 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/> | ||
2413 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
2414 | + <nil key="highlightedColor"/> | ||
2415 | + </label> | ||
2416 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z1U-JG-k4U"> | ||
2417 | + <rect key="frame" x="20" y="269" width="374" height="51"/> | ||
2418 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="17"/> | ||
2419 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
2420 | + <nil key="highlightedColor"/> | ||
2421 | + </label> | ||
2422 | + <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b5L-BJ-bRd" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework"> | ||
2423 | + <rect key="frame" x="20" y="335" width="374" height="0.0"/> | ||
2392 | <color key="backgroundColor" systemColor="systemBackgroundColor"/> | 2424 | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
2425 | + <constraints> | ||
2426 | + <constraint firstAttribute="height" id="Vf5-mh-mYl"/> | ||
2427 | + </constraints> | ||
2428 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/> | ||
2429 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/> | ||
2430 | + <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> | ||
2431 | + </textView> | ||
2432 | + <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"> | ||
2433 | + <rect key="frame" x="20" y="370" width="374" height="17"/> | ||
2434 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/> | ||
2435 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
2436 | + <nil key="highlightedColor"/> | ||
2437 | + </label> | ||
2438 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p9P-ZR-ZC2" userLabel="Coupon View"> | ||
2439 | + <rect key="frame" x="152.5" y="397" width="109.5" height="55"/> | ||
2440 | + <subviews> | ||
2441 | + <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"> | ||
2442 | + <rect key="frame" x="20" y="13.5" width="69.5" height="28"/> | ||
2443 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Bold" family="PF Square Sans Pro" pointSize="28"/> | ||
2444 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/> | ||
2445 | + <nil key="highlightedColor"/> | ||
2446 | + </label> | ||
2447 | + </subviews> | ||
2448 | + <color key="backgroundColor" red="0.95686274510000002" green="0.95686274510000002" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/> | ||
2449 | + <constraints> | ||
2450 | + <constraint firstAttribute="height" constant="55" id="1EO-q8-orQ"/> | ||
2451 | + <constraint firstAttribute="trailing" secondItem="Bz3-cq-84d" secondAttribute="trailing" constant="20" id="HXC-0E-aSK"/> | ||
2452 | + <constraint firstItem="Bz3-cq-84d" firstAttribute="leading" secondItem="p9P-ZR-ZC2" secondAttribute="leading" constant="20" id="cs2-FC-J3v"/> | ||
2453 | + <constraint firstItem="Bz3-cq-84d" firstAttribute="centerY" secondItem="p9P-ZR-ZC2" secondAttribute="centerY" id="lQQ-qR-UUi"/> | ||
2454 | + </constraints> | ||
2455 | + </view> | ||
2456 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ke2-PF-MgG" userLabel="Border View"> | ||
2457 | + <rect key="frame" x="20" y="472" width="374" height="1"/> | ||
2458 | + <color key="backgroundColor" red="0.90196078430000004" green="0.90196078430000004" blue="0.90196078430000004" alpha="1" colorSpace="calibratedRGB"/> | ||
2459 | + <constraints> | ||
2460 | + <constraint firstAttribute="height" constant="1" id="TtB-Ap-gwZ"/> | ||
2461 | + </constraints> | ||
2393 | </view> | 2462 | </view> |
2463 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0e4-jR-gJ2"> | ||
2464 | + <rect key="frame" x="30" y="483" width="354" height="110"/> | ||
2465 | + <constraints> | ||
2466 | + <constraint firstAttribute="height" constant="110" id="aLi-ff-Zln"/> | ||
2467 | + </constraints> | ||
2468 | + </imageView> | ||
2469 | + <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"> | ||
2470 | + <rect key="frame" x="20" y="603" width="374" height="26.5"/> | ||
2471 | + <constraints> | ||
2472 | + <constraint firstAttribute="height" constant="26.5" id="9mu-aR-zqX"/> | ||
2473 | + </constraints> | ||
2474 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="23"/> | ||
2475 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
2476 | + <nil key="highlightedColor"/> | ||
2477 | + </label> | ||
2478 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HK5-Qt-OFZ" userLabel="Border 2 View"> | ||
2479 | + <rect key="frame" x="20" y="644.5" width="374" height="1"/> | ||
2480 | + <color key="backgroundColor" red="0.90196078430000004" green="0.90196078430000004" blue="0.90196078430000004" alpha="1" colorSpace="calibratedRGB"/> | ||
2481 | + <constraints> | ||
2482 | + <constraint firstAttribute="height" constant="1" id="cnC-Ua-jhC"/> | ||
2483 | + </constraints> | ||
2484 | + </view> | ||
2485 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l3Z-rd-1se"> | ||
2486 | + <rect key="frame" x="103.5" y="655.5" width="207" height="50"/> | ||
2487 | + <constraints> | ||
2488 | + <constraint firstAttribute="height" constant="50" id="oi1-xW-7Ma"/> | ||
2489 | + </constraints> | ||
2490 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="16"/> | ||
2491 | + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="5" maxY="0.0"/> | ||
2492 | + <state key="normal" title="Εμφάνιση barcode" image="ic_down_dark"> | ||
2493 | + <color key="titleColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
2494 | + <preferredSymbolConfiguration key="preferredSymbolConfiguration"/> | ||
2495 | + </state> | ||
2496 | + <connections> | ||
2497 | + <action selector="showBarcodeAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="PKS-vX-Eqy"/> | ||
2498 | + </connections> | ||
2499 | + </button> | ||
2500 | + <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"> | ||
2501 | + <rect key="frame" x="20" y="740.5" width="374" height="15"/> | ||
2502 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/> | ||
2503 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
2504 | + <nil key="highlightedColor"/> | ||
2505 | + </label> | ||
2506 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zaj-yW-yxb"> | ||
2507 | + <rect key="frame" x="103.5" y="790.5" width="207" height="50"/> | ||
2508 | + <constraints> | ||
2509 | + <constraint firstAttribute="height" constant="50" id="t7m-Bz-eEx"/> | ||
2510 | + </constraints> | ||
2511 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/> | ||
2512 | + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="5" maxY="0.0"/> | ||
2513 | + <state key="normal" title="Εμφάνιση κουπονιών" image="ic_down_dark"> | ||
2514 | + <color key="titleColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
2515 | + <preferredSymbolConfiguration key="preferredSymbolConfiguration"/> | ||
2516 | + </state> | ||
2517 | + <connections> | ||
2518 | + <action selector="showCouponsButtonAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="tU8-LY-Jau"/> | ||
2519 | + </connections> | ||
2520 | + </button> | ||
2521 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="Jsn-Je-71G" customClass="ContentSizedTableView" customModule="SwiftWarplyFramework"> | ||
2522 | + <rect key="frame" x="0.0" y="855.5" width="414" height="200"/> | ||
2523 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2524 | + <constraints> | ||
2525 | + <constraint firstAttribute="height" constant="200" id="Xet-4I-j1J"/> | ||
2526 | + </constraints> | ||
2527 | + <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2528 | + <prototypes> | ||
2529 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CouponsTableViewCellId" id="TAK-Ug-AzU" customClass="CouponsTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
2530 | + <rect key="frame" x="0.0" y="50" width="414" height="105"/> | ||
2531 | + <autoresizingMask key="autoresizingMask"/> | ||
2532 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TAK-Ug-AzU" id="LFe-Vj-kjJ"> | ||
2533 | + <rect key="frame" x="0.0" y="0.0" width="414" height="105"/> | ||
2534 | + <autoresizingMask key="autoresizingMask"/> | ||
2535 | + <subviews> | ||
2536 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="35i-Iq-TId"> | ||
2537 | + <rect key="frame" x="10" y="0.0" width="394" height="105"/> | ||
2538 | + <subviews> | ||
2539 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupon_bg" translatesAutoresizingMaskIntoConstraints="NO" id="58G-jP-FMr"> | ||
2540 | + <rect key="frame" x="0.0" y="0.0" width="394" height="105"/> | ||
2541 | + </imageView> | ||
2542 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jcR-bh-Fhz"> | ||
2543 | + <rect key="frame" x="20" y="10" width="79" height="85"/> | ||
2544 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2545 | + </imageView> | ||
2546 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZDK-3b-8MQ"> | ||
2547 | + <rect key="frame" x="104" y="5" width="10" height="95"/> | ||
2548 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2549 | + <constraints> | ||
2550 | + <constraint firstAttribute="width" constant="10" id="sq7-pL-kd5"/> | ||
2551 | + </constraints> | ||
2552 | + </view> | ||
2553 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mOO-dc-RyS"> | ||
2554 | + <rect key="frame" x="119" y="15" width="255" height="17"/> | ||
2555 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/> | ||
2556 | + <color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> | ||
2557 | + <nil key="highlightedColor"/> | ||
2558 | + </label> | ||
2559 | + <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="NmF-B8-BxN"> | ||
2560 | + <rect key="frame" x="119" y="37" width="255" height="31"/> | ||
2561 | + <subviews> | ||
2562 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9CO-TF-h6H"> | ||
2563 | + <rect key="frame" x="0.0" y="0.0" width="127.5" height="31"/> | ||
2564 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Bold" family="PF Square Sans Pro" pointSize="31"/> | ||
2565 | + <color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> | ||
2566 | + <nil key="highlightedColor"/> | ||
2567 | + </label> | ||
2568 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XTf-q6-vau"> | ||
2569 | + <rect key="frame" x="132.5" y="0.0" width="122.5" height="31"/> | ||
2570 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/> | ||
2571 | + <color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/> | ||
2572 | + <nil key="highlightedColor"/> | ||
2573 | + </label> | ||
2574 | + </subviews> | ||
2575 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2576 | + <constraints> | ||
2577 | + <constraint firstItem="9CO-TF-h6H" firstAttribute="width" secondItem="NmF-B8-BxN" secondAttribute="width" multiplier="0.5" id="U9S-Wy-bJ2"/> | ||
2578 | + </constraints> | ||
2579 | + </stackView> | ||
2580 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="u51-sv-YiH"> | ||
2581 | + <rect key="frame" x="119" y="78" width="255" height="12"/> | ||
2582 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/> | ||
2583 | + <color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/> | ||
2584 | + <nil key="highlightedColor"/> | ||
2585 | + </label> | ||
2586 | + </subviews> | ||
2587 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2588 | + <constraints> | ||
2589 | + <constraint firstItem="NmF-B8-BxN" firstAttribute="centerY" secondItem="35i-Iq-TId" secondAttribute="centerY" id="2Ed-Nj-f6h"/> | ||
2590 | + <constraint firstAttribute="trailing" secondItem="mOO-dc-RyS" secondAttribute="trailing" constant="20" id="8Zl-md-YUY"/> | ||
2591 | + <constraint firstItem="jcR-bh-Fhz" firstAttribute="width" secondItem="35i-Iq-TId" secondAttribute="width" multiplier="0.2" id="8n1-lF-UlM"/> | ||
2592 | + <constraint firstItem="u51-sv-YiH" firstAttribute="leading" secondItem="ZDK-3b-8MQ" secondAttribute="trailing" constant="5" id="9pb-2H-f1h"/> | ||
2593 | + <constraint firstItem="ZDK-3b-8MQ" firstAttribute="top" secondItem="35i-Iq-TId" secondAttribute="top" constant="5" id="EEP-lx-N0t"/> | ||
2594 | + <constraint firstAttribute="bottom" secondItem="ZDK-3b-8MQ" secondAttribute="bottom" constant="5" id="FYp-0E-Uw0"/> | ||
2595 | + <constraint firstAttribute="bottom" secondItem="u51-sv-YiH" secondAttribute="bottom" constant="15" id="Flf-tQ-WhD"/> | ||
2596 | + <constraint firstAttribute="bottom" secondItem="58G-jP-FMr" secondAttribute="bottom" id="GSk-WB-Iet"/> | ||
2597 | + <constraint firstItem="58G-jP-FMr" firstAttribute="leading" secondItem="35i-Iq-TId" secondAttribute="leading" id="JCp-aq-cPq"/> | ||
2598 | + <constraint firstItem="jcR-bh-Fhz" firstAttribute="leading" secondItem="35i-Iq-TId" secondAttribute="leading" constant="20" id="L9F-dG-daa"/> | ||
2599 | + <constraint firstItem="58G-jP-FMr" firstAttribute="top" secondItem="35i-Iq-TId" secondAttribute="top" id="NDb-ma-RxF"/> | ||
2600 | + <constraint firstItem="ZDK-3b-8MQ" firstAttribute="leading" secondItem="jcR-bh-Fhz" secondAttribute="trailing" constant="5" id="NFe-FK-tFF"/> | ||
2601 | + <constraint firstItem="NmF-B8-BxN" firstAttribute="leading" secondItem="ZDK-3b-8MQ" secondAttribute="trailing" constant="5" id="QzX-xe-Gmc"/> | ||
2602 | + <constraint firstItem="u51-sv-YiH" firstAttribute="top" relation="greaterThanOrEqual" secondItem="NmF-B8-BxN" secondAttribute="bottom" constant="5" id="RUi-pY-M3y"/> | ||
2603 | + <constraint firstItem="jcR-bh-Fhz" firstAttribute="top" secondItem="35i-Iq-TId" secondAttribute="top" constant="10" id="W7a-RI-eFK"/> | ||
2604 | + <constraint firstAttribute="trailing" secondItem="NmF-B8-BxN" secondAttribute="trailing" constant="20" id="WXz-rG-ZBX"/> | ||
2605 | + <constraint firstItem="mOO-dc-RyS" firstAttribute="top" secondItem="35i-Iq-TId" secondAttribute="top" constant="15" id="bB4-81-G6R"/> | ||
2606 | + <constraint firstItem="mOO-dc-RyS" firstAttribute="leading" secondItem="ZDK-3b-8MQ" secondAttribute="trailing" constant="5" id="dfS-C5-yrS"/> | ||
2607 | + <constraint firstItem="NmF-B8-BxN" firstAttribute="top" relation="greaterThanOrEqual" secondItem="mOO-dc-RyS" secondAttribute="bottom" constant="5" id="hwb-y3-RPk"/> | ||
2608 | + <constraint firstAttribute="bottom" secondItem="jcR-bh-Fhz" secondAttribute="bottom" constant="10" id="jGC-H8-LPk"/> | ||
2609 | + <constraint firstAttribute="trailing" secondItem="58G-jP-FMr" secondAttribute="trailing" id="ndw-7x-qT3"/> | ||
2610 | + <constraint firstAttribute="trailing" secondItem="u51-sv-YiH" secondAttribute="trailing" constant="20" id="vZk-48-uaD"/> | ||
2611 | + </constraints> | ||
2612 | + </view> | ||
2613 | + </subviews> | ||
2614 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2615 | + <constraints> | ||
2616 | + <constraint firstItem="35i-Iq-TId" firstAttribute="leading" secondItem="LFe-Vj-kjJ" secondAttribute="leading" constant="10" id="3hq-3Z-4i8"/> | ||
2617 | + <constraint firstItem="35i-Iq-TId" firstAttribute="top" secondItem="LFe-Vj-kjJ" secondAttribute="top" id="Ex4-yD-ujb"/> | ||
2618 | + <constraint firstAttribute="trailing" secondItem="35i-Iq-TId" secondAttribute="trailing" constant="10" id="GdO-6L-lwn"/> | ||
2619 | + <constraint firstAttribute="bottom" secondItem="35i-Iq-TId" secondAttribute="bottom" id="Qim-cz-Ryu"/> | ||
2620 | + </constraints> | ||
2621 | + </tableViewCellContentView> | ||
2622 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2623 | + <connections> | ||
2624 | + <outlet property="borderView" destination="ZDK-3b-8MQ" id="qma-5l-a6k"/> | ||
2625 | + <outlet property="couponBgImage" destination="58G-jP-FMr" id="ax7-k5-OVV"/> | ||
2626 | + <outlet property="couponImage" destination="jcR-bh-Fhz" id="OSo-eQ-p6a"/> | ||
2627 | + <outlet property="dicountLabel" destination="9CO-TF-h6H" id="n8h-DI-pzv"/> | ||
2628 | + <outlet property="discriptionLabel" destination="XTf-q6-vau" id="0th-ti-mlx"/> | ||
2629 | + <outlet property="expirationLabel" destination="u51-sv-YiH" id="SLL-Xy-SY4"/> | ||
2630 | + <outlet property="nameLabel" destination="mOO-dc-RyS" id="zZp-my-uZI"/> | ||
2631 | + </connections> | ||
2632 | + </tableViewCell> | ||
2633 | + </prototypes> | ||
2634 | + <connections> | ||
2635 | + <outlet property="dataSource" destination="kZo-uj-MVp" id="l5z-oz-swz"/> | ||
2636 | + <outlet property="delegate" destination="kZo-uj-MVp" id="Gfo-Do-Bkw"/> | ||
2637 | + </connections> | ||
2638 | + </tableView> | ||
2639 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NYi-ps-hZw"> | ||
2640 | + <rect key="frame" x="139.5" y="1090.5" width="135" height="44"/> | ||
2641 | + <constraints> | ||
2642 | + <constraint firstAttribute="height" constant="44" id="ERH-et-F0E"/> | ||
2643 | + </constraints> | ||
2644 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="16"/> | ||
2645 | + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> | ||
2646 | + <state key="normal" title="Δες τα καταστήματα"> | ||
2647 | + <color key="titleColor" red="0.31372549020000001" green="0.61960784310000006" blue="0.1843137255" alpha="1" colorSpace="calibratedRGB"/> | ||
2648 | + </state> | ||
2649 | + <connections> | ||
2650 | + <action selector="mapButtonAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="LNC-9q-ejl"/> | ||
2651 | + </connections> | ||
2652 | + </button> | ||
2653 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qEo-pP-n0h"> | ||
2654 | + <rect key="frame" x="103.5" y="1154.5" width="207" height="50"/> | ||
2655 | + <constraints> | ||
2656 | + <constraint firstAttribute="height" constant="50" id="Noz-pm-Rmy"/> | ||
2657 | + </constraints> | ||
2658 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/> | ||
2659 | + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="5" maxY="0.0"/> | ||
2660 | + <state key="normal" title="Όροι χρήσης" image="ic_down_dark"> | ||
2661 | + <color key="titleColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
2662 | + <preferredSymbolConfiguration key="preferredSymbolConfiguration"/> | ||
2663 | + </state> | ||
2664 | + <connections> | ||
2665 | + <action selector="termsButtonAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="jTa-Ty-qFn"/> | ||
2666 | + </connections> | ||
2667 | + </button> | ||
2668 | + <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XRd-W8-YCf" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework"> | ||
2669 | + <rect key="frame" x="20" y="1214.5" width="374" height="0.0"/> | ||
2670 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
2671 | + <constraints> | ||
2672 | + <constraint firstAttribute="height" id="kUA-53-MNE"/> | ||
2673 | + </constraints> | ||
2674 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/> | ||
2675 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/> | ||
2676 | + <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> | ||
2677 | + </textView> | ||
2678 | + </subviews> | ||
2679 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
2680 | + <constraints> | ||
2681 | + <constraint firstItem="p9P-ZR-ZC2" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="h6B-3P-USu" secondAttribute="leading" constant="25" id="007-bh-Mq1"/> | ||
2682 | + <constraint firstAttribute="trailing" secondItem="HK5-Qt-OFZ" secondAttribute="trailing" constant="20" id="0Gv-bT-WxV"/> | ||
2683 | + <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="p9P-ZR-ZC2" secondAttribute="trailing" constant="25" id="1bd-sw-OGt"/> | ||
2684 | + <constraint firstAttribute="trailing" secondItem="XRd-W8-YCf" secondAttribute="trailing" constant="20" id="4sc-JD-hZm"/> | ||
2685 | + <constraint firstItem="Bmm-wl-752" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="54t-tD-9yM"/> | ||
2686 | + <constraint firstAttribute="trailing" secondItem="Ke2-PF-MgG" secondAttribute="trailing" constant="20" id="5uX-Lg-16f"/> | ||
2687 | + <constraint firstItem="qEo-pP-n0h" firstAttribute="width" secondItem="h6B-3P-USu" secondAttribute="width" multiplier="0.5" id="6Qm-94-CbZ"/> | ||
2688 | + <constraint firstAttribute="trailing" secondItem="Bmm-wl-752" secondAttribute="trailing" constant="20" id="74j-fN-F1a"/> | ||
2689 | + <constraint firstItem="jbu-lq-22w" firstAttribute="top" secondItem="h6B-3P-USu" secondAttribute="top" id="77S-EB-I9n"/> | ||
2690 | + <constraint firstItem="wB5-TH-zF6" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="7Xp-Hh-b7M"/> | ||
2691 | + <constraint firstItem="XRd-W8-YCf" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="Bjx-ym-XLB"/> | ||
2692 | + <constraint firstItem="qEo-pP-n0h" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="CKS-XP-QAN"/> | ||
2693 | + <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="qEo-pP-n0h" secondAttribute="bottom" constant="30" id="E3K-lI-LCA"/> | ||
2694 | + <constraint firstItem="0e4-jR-gJ2" firstAttribute="top" secondItem="Ke2-PF-MgG" secondAttribute="bottom" constant="10" id="FeW-6g-7nZ"/> | ||
2695 | + <constraint firstItem="p9P-ZR-ZC2" firstAttribute="top" secondItem="wB5-TH-zF6" secondAttribute="bottom" constant="10" id="G0T-2t-BKh"/> | ||
2696 | + <constraint firstItem="KcC-nd-UJt" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="GE8-CX-1fl"/> | ||
2697 | + <constraint firstItem="NYi-ps-hZw" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="GwJ-8P-npS"/> | ||
2698 | + <constraint firstItem="XEh-1k-bk7" firstAttribute="top" secondItem="jbu-lq-22w" secondAttribute="bottom" constant="20" id="HCb-Uz-CQC"/> | ||
2699 | + <constraint firstItem="XEh-1k-bk7" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="HRC-XR-2Z2"/> | ||
2700 | + <constraint firstItem="Bmm-wl-752" firstAttribute="top" secondItem="l3Z-rd-1se" secondAttribute="bottom" constant="35" id="HbV-nu-Hpt"/> | ||
2701 | + <constraint firstAttribute="trailing" secondItem="0e4-jR-gJ2" secondAttribute="trailing" constant="30" id="HxT-Ci-qXC"/> | ||
2702 | + <constraint firstItem="zaj-yW-yxb" firstAttribute="width" secondItem="h6B-3P-USu" secondAttribute="width" multiplier="0.5" id="Jak-kG-SlN"/> | ||
2703 | + <constraint firstItem="NYi-ps-hZw" firstAttribute="top" secondItem="Jsn-Je-71G" secondAttribute="bottom" constant="35" id="Jsa-kb-xSz"/> | ||
2704 | + <constraint firstItem="l3Z-rd-1se" firstAttribute="top" secondItem="HK5-Qt-OFZ" secondAttribute="bottom" constant="10" id="LiN-pJ-pjN"/> | ||
2705 | + <constraint firstAttribute="trailing" secondItem="KcC-nd-UJt" secondAttribute="trailing" constant="20" id="Mfx-q9-cuK"/> | ||
2706 | + <constraint firstItem="XRd-W8-YCf" firstAttribute="top" secondItem="qEo-pP-n0h" secondAttribute="bottom" constant="10" id="Nd4-Gg-uk1"/> | ||
2707 | + <constraint firstItem="HK5-Qt-OFZ" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="Nt2-qa-UoE"/> | ||
2708 | + <constraint firstItem="Jsn-Je-71G" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" id="O6Y-XK-nnc"/> | ||
2709 | + <constraint firstItem="z1U-JG-k4U" firstAttribute="top" secondItem="XEh-1k-bk7" secondAttribute="bottom" constant="15" id="OK6-wa-Ybp"/> | ||
2710 | + <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="XRd-W8-YCf" secondAttribute="bottom" constant="30" id="PqJ-aK-gFO"/> | ||
2711 | + <constraint firstItem="zaj-yW-yxb" firstAttribute="top" secondItem="Bmm-wl-752" secondAttribute="bottom" constant="35" id="QYD-3G-JMi"/> | ||
2712 | + <constraint firstAttribute="trailing" secondItem="wB5-TH-zF6" secondAttribute="trailing" constant="20" id="RUA-zf-2M5"/> | ||
2713 | + <constraint firstItem="p9P-ZR-ZC2" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="Roj-dQ-hYS"/> | ||
2714 | + <constraint firstItem="KcC-nd-UJt" firstAttribute="top" secondItem="0e4-jR-gJ2" secondAttribute="bottom" constant="10" id="SH6-4R-cCp"/> | ||
2715 | + <constraint firstAttribute="trailing" secondItem="Jsn-Je-71G" secondAttribute="trailing" id="SMG-d4-tot"/> | ||
2716 | + <constraint firstAttribute="trailing" secondItem="XEh-1k-bk7" secondAttribute="trailing" constant="20" id="XIz-C7-XrD"/> | ||
2717 | + <constraint firstItem="l3Z-rd-1se" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="YD9-GP-0ms"/> | ||
2718 | + <constraint firstItem="qEo-pP-n0h" firstAttribute="top" secondItem="NYi-ps-hZw" secondAttribute="bottom" constant="20" id="Zt9-R1-mr2"/> | ||
2719 | + <constraint firstItem="b5L-BJ-bRd" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="arK-Zd-Hgy"/> | ||
2720 | + <constraint firstItem="Ke2-PF-MgG" firstAttribute="top" secondItem="p9P-ZR-ZC2" secondAttribute="bottom" constant="20" id="cmv-I1-vKp"/> | ||
2721 | + <constraint firstItem="z1U-JG-k4U" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="cyH-Xu-zU6"/> | ||
2722 | + <constraint firstItem="wB5-TH-zF6" firstAttribute="top" secondItem="b5L-BJ-bRd" secondAttribute="bottom" constant="35" id="fR9-cP-N5X"/> | ||
2723 | + <constraint firstAttribute="trailing" secondItem="z1U-JG-k4U" secondAttribute="trailing" constant="20" id="ghn-UI-BtO"/> | ||
2724 | + <constraint firstAttribute="trailing" secondItem="b5L-BJ-bRd" secondAttribute="trailing" constant="20" id="iby-Dv-64i"/> | ||
2725 | + <constraint firstItem="Ke2-PF-MgG" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="jsN-8I-dDs"/> | ||
2726 | + <constraint firstAttribute="trailing" secondItem="jbu-lq-22w" secondAttribute="trailing" id="nZs-Mo-gQn"/> | ||
2727 | + <constraint firstItem="zaj-yW-yxb" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="ner-V9-uet"/> | ||
2728 | + <constraint firstItem="jbu-lq-22w" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" id="nlJ-Jr-W1y"/> | ||
2729 | + <constraint firstItem="l3Z-rd-1se" firstAttribute="width" secondItem="h6B-3P-USu" secondAttribute="width" multiplier="0.5" id="pBD-ac-8QV"/> | ||
2730 | + <constraint firstItem="HK5-Qt-OFZ" firstAttribute="top" secondItem="KcC-nd-UJt" secondAttribute="bottom" constant="15" id="sjJ-5g-cKb"/> | ||
2731 | + <constraint firstItem="0e4-jR-gJ2" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="30" id="t1y-43-ggS"/> | ||
2732 | + <constraint firstItem="Jsn-Je-71G" firstAttribute="top" secondItem="zaj-yW-yxb" secondAttribute="bottom" constant="15" id="tP4-IY-o5w"/> | ||
2733 | + <constraint firstItem="b5L-BJ-bRd" firstAttribute="top" secondItem="z1U-JG-k4U" secondAttribute="bottom" constant="15" id="xxC-cP-Rv9"/> | ||
2734 | + </constraints> | ||
2735 | + </view> | ||
2736 | + </subviews> | ||
2737 | + <constraints> | ||
2738 | + <constraint firstItem="h6B-3P-USu" firstAttribute="top" secondItem="Bwm-0z-5fj" secondAttribute="top" id="0QV-nm-q49"/> | ||
2739 | + <constraint firstItem="h6B-3P-USu" firstAttribute="bottom" secondItem="Bwm-0z-5fj" secondAttribute="bottom" id="cMM-3m-nO7"/> | ||
2740 | + <constraint firstItem="h6B-3P-USu" firstAttribute="trailing" secondItem="Bwm-0z-5fj" secondAttribute="trailing" id="dHs-br-RnG"/> | ||
2741 | + <constraint firstItem="h6B-3P-USu" firstAttribute="width" secondItem="J9l-2m-hLG" secondAttribute="width" id="p3R-hD-ebm"/> | ||
2742 | + <constraint firstItem="h6B-3P-USu" firstAttribute="leading" secondItem="Bwm-0z-5fj" secondAttribute="leading" id="zDh-cb-g0k"/> | ||
2743 | + </constraints> | ||
2744 | + <viewLayoutGuide key="contentLayoutGuide" id="Bwm-0z-5fj"/> | ||
2745 | + <viewLayoutGuide key="frameLayoutGuide" id="J9l-2m-hLG"/> | ||
2746 | + </scrollView> | ||
2747 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="k6Y-8d-5AX"> | ||
2748 | + <rect key="frame" x="0.0" y="420" width="414" height="11.5"/> | ||
2749 | + </imageView> | ||
2750 | + </subviews> | ||
2751 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2752 | + <constraints> | ||
2753 | + <constraint firstAttribute="bottom" secondItem="F2x-ch-ng3" secondAttribute="bottom" id="Bxi-Lf-m8N"/> | ||
2754 | + <constraint firstItem="h6B-3P-USu" firstAttribute="height" relation="greaterThanOrEqual" secondItem="1tN-9F-yxg" secondAttribute="height" id="JTm-bV-cw8"/> | ||
2755 | + <constraint firstItem="F2x-ch-ng3" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="Jos-cl-7VR"/> | ||
2756 | + <constraint firstItem="k6Y-8d-5AX" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="SIr-Hi-Dyx"/> | ||
2757 | + <constraint firstItem="F2x-ch-ng3" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="U0W-zW-DaZ"/> | ||
2758 | + <constraint firstAttribute="trailing" secondItem="F2x-ch-ng3" secondAttribute="trailing" id="fiO-e6-Uyi"/> | ||
2759 | + <constraint firstItem="Leh-kL-DF1" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="i78-sg-xrF"/> | ||
2760 | + <constraint firstAttribute="trailing" secondItem="k6Y-8d-5AX" secondAttribute="trailing" id="iXg-hc-zBk"/> | ||
2761 | + <constraint firstItem="Leh-kL-DF1" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="mcD-r4-3uU"/> | ||
2762 | + <constraint firstItem="k6Y-8d-5AX" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="o5b-Jd-fzM"/> | ||
2763 | + <constraint firstAttribute="trailing" secondItem="Leh-kL-DF1" secondAttribute="trailing" id="syn-qO-3hi"/> | ||
2764 | + <constraint firstAttribute="bottom" secondItem="Leh-kL-DF1" secondAttribute="bottom" id="uv2-fR-r9D"/> | ||
2765 | + </constraints> | ||
2766 | + <variation key="default"> | ||
2767 | + <mask key="subviews"> | ||
2768 | + <exclude reference="Leh-kL-DF1"/> | ||
2769 | + </mask> | ||
2770 | + </variation> | ||
2771 | + </view> | ||
2772 | + </subviews> | ||
2773 | + <viewLayoutGuide key="safeArea" id="fJk-Nc-evo"/> | ||
2774 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
2775 | + <constraints> | ||
2776 | + <constraint firstAttribute="trailing" secondItem="1tN-9F-yxg" secondAttribute="trailing" id="I64-hf-xQy"/> | ||
2777 | + <constraint firstItem="1tN-9F-yxg" firstAttribute="leading" secondItem="NDg-r8-0Mc" secondAttribute="leading" id="sM5-2E-86a"/> | ||
2778 | + <constraint firstItem="1tN-9F-yxg" firstAttribute="top" secondItem="fJk-Nc-evo" secondAttribute="top" id="vZT-Ke-CSL"/> | ||
2779 | + <constraint firstAttribute="bottom" secondItem="1tN-9F-yxg" secondAttribute="bottom" id="vsS-Bj-Vdx"/> | ||
2780 | + </constraints> | ||
2781 | + </view> | ||
2782 | + <connections> | ||
2783 | + <outlet property="backgroundImage" destination="Leh-kL-DF1" id="Yh4-J9-2fn"/> | ||
2784 | + <outlet property="barcodeImage" destination="0e4-jR-gJ2" id="K57-UT-nEz"/> | ||
2785 | + <outlet property="barcodeImageHeight" destination="aLi-ff-Zln" id="fmv-UO-1xh"/> | ||
2786 | + <outlet property="barcodeImageTopSpace" destination="FeW-6g-7nZ" id="geW-rH-Ncb"/> | ||
2787 | + <outlet property="barcodeLabel" destination="KcC-nd-UJt" id="nuA-M8-lfz"/> | ||
2788 | + <outlet property="barcodeLabelHeight" destination="9mu-aR-zqX" id="LkC-oC-uBB"/> | ||
2789 | + <outlet property="barcodeLabelTopSpace" destination="SH6-4R-cCp" id="Ika-Hf-UZJ"/> | ||
2790 | + <outlet property="border1TopSpace" destination="cmv-I1-vKp" id="uDK-md-rLQ"/> | ||
2791 | + <outlet property="border2TopSpace" destination="sjJ-5g-cKb" id="Irm-bW-hhb"/> | ||
2792 | + <outlet property="borderView2Height" destination="cnC-Ua-jhC" id="Sft-A8-tkZ"/> | ||
2793 | + <outlet property="borderViewHeight" destination="TtB-Ap-gwZ" id="8uH-4S-wv9"/> | ||
2794 | + <outlet property="couponImage" destination="jbu-lq-22w" id="S5m-GI-lAj"/> | ||
2795 | + <outlet property="couponImageHeight" destination="qtq-sH-2GF" id="deR-r5-eSP"/> | ||
2796 | + <outlet property="couponNumberLabel" destination="Bz3-cq-84d" id="4BL-AF-mRu"/> | ||
2797 | + <outlet property="couponView" destination="p9P-ZR-ZC2" id="eTA-tl-HKI"/> | ||
2798 | + <outlet property="discriptionLabel" destination="z1U-JG-k4U" id="svr-qs-rtD"/> | ||
2799 | + <outlet property="expirationLabel" destination="Bmm-wl-752" id="DjA-bw-ewR"/> | ||
2800 | + <outlet property="mainView" destination="1tN-9F-yxg" id="57p-Ru-90A"/> | ||
2801 | + <outlet property="mapButton" destination="NYi-ps-hZw" id="IgR-mN-HJO"/> | ||
2802 | + <outlet property="mapButtonHeight" destination="ERH-et-F0E" id="IrJ-ng-0OU"/> | ||
2803 | + <outlet property="mapButtonTopSpace" destination="Jsa-kb-xSz" id="a9I-wA-tqZ"/> | ||
2804 | + <outlet property="merchantDescrTextView" destination="b5L-BJ-bRd" id="FyS-oQ-cm4"/> | ||
2805 | + <outlet property="merchantDescrTextViewHeight" destination="Vf5-mh-mYl" id="FMX-nf-Q5b"/> | ||
2806 | + <outlet property="merchantDescrTextViewTopSpace" destination="xxC-cP-Rv9" id="2oC-LP-Qih"/> | ||
2807 | + <outlet property="nameLabel" destination="XEh-1k-bk7" id="z04-hZ-hkV"/> | ||
2808 | + <outlet property="scrollContentView" destination="h6B-3P-USu" id="MWb-in-8tj"/> | ||
2809 | + <outlet property="scrollView" destination="F2x-ch-ng3" id="dbe-Qt-LyZ"/> | ||
2810 | + <outlet property="showBarcodeButton" destination="l3Z-rd-1se" id="8M5-vy-RzO"/> | ||
2811 | + <outlet property="showBarcodeButtonHeight" destination="oi1-xW-7Ma" id="6lt-Ex-DuD"/> | ||
2812 | + <outlet property="showBarcodeButtonTopSpace" destination="LiN-pJ-pjN" id="aXh-ZZ-cWO"/> | ||
2813 | + <outlet property="showCouponsButton" destination="zaj-yW-yxb" id="gVY-xH-aMw"/> | ||
2814 | + <outlet property="tableView" destination="Jsn-Je-71G" id="mZF-SD-0R2"/> | ||
2815 | + <outlet property="tableViewHeight" destination="Xet-4I-j1J" id="4Ti-cu-FbZ"/> | ||
2816 | + <outlet property="termsButton" destination="qEo-pP-n0h" id="1QS-vK-40s"/> | ||
2817 | + <outlet property="termsTextView" destination="XRd-W8-YCf" id="Lad-5v-1WT"/> | ||
2818 | + <outlet property="termsTextViewHeight" destination="kUA-53-MNE" id="R1h-wF-gA7"/> | ||
2819 | + <outlet property="topBorderLine" destination="k6Y-8d-5AX" id="P78-tI-PAD"/> | ||
2820 | + </connections> | ||
2394 | </viewController> | 2821 | </viewController> |
2395 | <placeholder placeholderIdentifier="IBFirstResponder" id="ZLv-p2-P1H" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | 2822 | <placeholder placeholderIdentifier="IBFirstResponder" id="ZLv-p2-P1H" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> |
2396 | </objects> | 2823 | </objects> | ... | ... |
... | @@ -6,24 +6,563 @@ | ... | @@ -6,24 +6,563 @@ |
6 | // | 6 | // |
7 | 7 | ||
8 | import UIKit | 8 | import UIKit |
9 | +import RSBarcodes_Swift | ||
10 | +import AVFoundation | ||
11 | +// import SwiftEventBus | ||
9 | 12 | ||
10 | -class UnifiedCouponBarcodeViewController: UIViewController { | 13 | +final class ContentSizedTableView: UITableView { |
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 | +} | ||
11 | 37 | ||
12 | - override func viewDidLoad() { | 38 | +@objc public class UnifiedCouponBarcodeViewController: UIViewController, UITextViewDelegate { |
39 | + @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: ContentSizedTableView! | ||
74 | + @IBOutlet weak var tableViewHeight: NSLayoutConstraint! | ||
75 | + @IBOutlet weak var showCouponsButton: UIButton! | ||
76 | + | ||
77 | + let uiscreen: CGRect = UIScreen.main.bounds | ||
78 | + | ||
79 | + var termsVisible: Bool = false; | ||
80 | + var barcodeVisible: Bool = false; | ||
81 | + var couponsVisible: Bool = false; | ||
82 | + | ||
83 | + var mapBtnVisible: Bool = false; | ||
84 | + var eshopBtnVisible: Bool = false; | ||
85 | + var eshopWebsite: String = ""; | ||
86 | + | ||
87 | + public var coupon: swiftApi.UnifiedCouponModel? | ||
88 | + public var isFromWallet: Bool? = false | ||
89 | + | ||
90 | + public override func viewDidLoad() { | ||
13 | super.viewDidLoad() | 91 | super.viewDidLoad() |
14 | 92 | ||
93 | + self.hidesBottomBarWhenPushed = true | ||
94 | + merchantDescrTextView.delegate = self | ||
95 | + termsTextView.delegate = self | ||
96 | + | ||
97 | + tableView.delegate = self | ||
98 | + tableView.dataSource = self | ||
99 | + | ||
15 | // Do any additional setup after loading the view. | 100 | // Do any additional setup after loading the view. |
101 | + setBackButton() | ||
102 | + setNavigationTitle("Εκπτωτικό κουπόνι") | ||
103 | + | ||
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: "PFSquareSansPro-Regular", size: 17) | ||
155 | +// merchantDescrTextView.textColor = UIColor(red: 0.25, green: 0.33, blue: 0.39, 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 = 8 | ||
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: "PFSquareSansPro-Medium", 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.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: "PFSquareSansPro-Regular", size: 16) | ||
289 | +// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | ||
290 | + showCouponsButton.setTitle("Εμφάνιση κουπονιών", for: .normal) | ||
291 | + showCouponsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) | ||
292 | + showCouponsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | ||
293 | + showCouponsButton.semanticContentAttribute = .forceRightToLeft | ||
294 | + showCouponsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, 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.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 | ||
336 | +// print("Coupon: " + (coupon?.coupon ?? "")) | ||
337 | +// print("Coupon Name: " + (couponSetData?.name ?? "")) | ||
338 | +// print("Coupon Description: " + (couponSetData?.short_description ?? "")) | ||
339 | +// print("Coupon Expiration: " + (coupon?.expiration ?? "")) | ||
340 | + | ||
341 | + } | ||
342 | + | ||
343 | + public override func viewWillAppear(_ animated: Bool) { | ||
344 | + super.viewWillAppear(animated) | ||
345 | + | ||
346 | + swiftApi().logTrackersEvent("screen", "UnifiedCouponScreen") | ||
347 | + | ||
16 | } | 348 | } |
17 | 349 | ||
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 | + | ||
358 | + // 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.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.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.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.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.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.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 | + | ||
476 | + // MARK: - Actions | ||
477 | + @IBAction func showCouponsButtonAction(_ sender: Any) { | ||
478 | + couponsVisible = !couponsVisible | ||
479 | + toggleCoupons() | ||
480 | + } | ||
481 | + | ||
482 | + @IBAction func showBarcodeAction(_ sender: Any) { | ||
483 | + barcodeVisible = !barcodeVisible | ||
484 | + toggleBarcode() | ||
485 | + } | ||
486 | + | ||
487 | + @IBAction func termsButtonAction(_ sender: Any) { | ||
488 | + termsVisible = !termsVisible | ||
489 | + toggleTerms() | ||
490 | + } | ||
491 | + | ||
492 | + @IBAction func mapButtonAction(_ sender: Any) { | ||
493 | +// swiftApi().logTrackersEvent("click", "SeeShops") | ||
494 | +// | ||
495 | +// let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self)) | ||
496 | +// vc.couponSet = coupon?.couponset_data | ||
497 | +// self.navigationController?.pushViewController(vc, animated: true) | ||
498 | + | ||
499 | + // if (mapBtnVisible == true) { | ||
500 | + // swiftApi().logTrackersEvent("click", "SeeShops") | ||
501 | + | ||
502 | + // let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self)) | ||
503 | + // vc.couponSet = coupon?.couponset_data | ||
504 | + // self.navigationController?.pushViewController(vc, animated: true) | ||
505 | + | ||
506 | + // } else if (eshopBtnVisible == true) { | ||
507 | + // if (eshopWebsite != "") { | ||
508 | + // guard let websiteUrl = URL(string: eshopWebsite) else { | ||
509 | + // print("Error creating URL") | ||
510 | + // return | ||
511 | + // } | ||
512 | + | ||
513 | + // // check if link can be opened. | ||
514 | + // guard UIApplication.shared.canOpenURL(websiteUrl) else { | ||
515 | + // return | ||
516 | + // } | ||
517 | + | ||
518 | + // swiftApi().logTrackersEvent("click", "SeeShopWebsite") | ||
519 | + // UIApplication.shared.open(websiteUrl, options: [:], completionHandler: nil) | ||
520 | + // } | ||
521 | + // } | ||
522 | + } | ||
523 | +} | ||
524 | + | ||
525 | +// MARK: - TableView | ||
526 | +extension UnifiedCouponBarcodeViewController: UITableViewDelegate, UITableViewDataSource{ | ||
527 | + | ||
528 | + public func numberOfSections(in tableView: UITableView) -> Int { | ||
529 | + return 1 | ||
530 | + } | ||
531 | + | ||
532 | + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
533 | + return self.coupon?._coupons.count ?? 0 | ||
534 | + } | ||
535 | + | ||
536 | + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
537 | + return 120.0 + 8.0 | ||
538 | +// return UITableViewAutomaticDimension | ||
539 | + } | ||
540 | + | ||
541 | + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
542 | + let cell = tableView.dequeueReusableCell(withIdentifier: "CouponsTableViewCellId", for: indexPath) as! CouponsTableViewCell | ||
543 | + | ||
544 | + cell.configureCell(coupon: (self.coupon?._coupons[indexPath.row])!) | ||
545 | + | ||
546 | + return cell | ||
547 | + } | ||
548 | + | ||
549 | + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
550 | + | ||
551 | + // SwiftEventBus.post("couponBarcodePressed", sender: coupons[indexPath.row]) | ||
552 | + | ||
553 | + // Logs | ||
554 | +// let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data | ||
555 | +// print("Coupon clicked: " + (coupons[indexPath.row].coupon ?? "")) | ||
556 | +// print("Coupon Name clicked: " + (couponSetData?.name ?? "")) | ||
557 | +// print("Coupon Description clicked: " + (couponSetData?.short_description ?? "")) | ||
558 | +// print("Coupon Expiration clicked: " + (coupons[indexPath.row].expiration ?? "")) | ||
18 | 559 | ||
19 | - /* | 560 | +// swiftApi().logTrackersEvent("click", ("Coupon:" + (couponSetData?.name ?? ""))) |
20 | - // MARK: - Navigation | ||
21 | 561 | ||
22 | - // In a storyboard-based application, you will often want to do a little preparation before navigation | 562 | +// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
23 | - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | 563 | +// let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController |
24 | - // Get the new view controller using segue.destination. | 564 | +// vc.coupon = self.coupon?._coupons[indexPath.row] |
25 | - // Pass the selected object to the new view controller. | 565 | +// self.navigationController?.pushViewController(vc, animated: true) |
26 | } | 566 | } |
27 | - */ | ||
28 | 567 | ||
29 | } | 568 | } | ... | ... |
... | @@ -845,16 +845,16 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -845,16 +845,16 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ |
845 | // Do nothing | 845 | // Do nothing |
846 | 846 | ||
847 | } else if (indexPath.section == 1) { | 847 | } else if (indexPath.section == 1) { |
848 | - // TODO: open unified CouponBarcodeViewController | 848 | + // TODO: Add trackers |
849 | // let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data | 849 | // let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data |
850 | // let couponName = couponSetData?.name ?? "" | 850 | // let couponName = couponSetData?.name ?? "" |
851 | // swiftApi().logTrackersEvent("click", ("Coupon:" + couponName)) | 851 | // swiftApi().logTrackersEvent("click", ("Coupon:" + couponName)) |
852 | -// | 852 | + |
853 | -// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 853 | + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
854 | -// let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController | 854 | + let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponBarcodeViewController") as! SwiftWarplyFramework.UnifiedCouponBarcodeViewController |
855 | -// vc.coupon = coupons[indexPath.row] | 855 | + vc.coupon = unifiedCoupons[indexPath.row] |
856 | -// vc.isFromWallet = true | 856 | + vc.isFromWallet = true |
857 | -// self.navigationController?.pushViewController(vc, animated: true) | 857 | + self.navigationController?.pushViewController(vc, animated: true) |
858 | 858 | ||
859 | } else if (indexPath.section == 2) { | 859 | } else if (indexPath.section == 2) { |
860 | print("Active DFY coupon banner Tapped!") | 860 | print("Active DFY coupon banner Tapped!") | ... | ... |
-
Please register or login to post a comment