Manos Chorianopoulos

UnifiedCouponBarcodeViewController incomplete

......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -2384,13 +2384,440 @@
<!--Unified Coupon Barcode View Controller-->
<scene sceneID="t9s-3l-Rx0">
<objects>
<viewController storyboardIdentifier="UnifiedCouponBarcodeViewController" id="kZo-uj-MVp" customClass="UnifiedCouponBarcodeViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="UnifiedCouponBarcodeViewController" hidesBottomBarWhenPushed="YES" id="kZo-uj-MVp" customClass="UnifiedCouponBarcodeViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="NDg-r8-0Mc">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1tN-9F-yxg" userLabel="Main View">
<rect key="frame" x="0.0" y="48" width="414" height="848"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupons_scrollview_white" translatesAutoresizingMaskIntoConstraints="NO" id="Leh-kL-DF1">
<rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
</imageView>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="F2x-ch-ng3">
<rect key="frame" x="0.0" y="5" width="414" height="847"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="h6B-3P-USu">
<rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jbu-lq-22w">
<rect key="frame" x="0.0" y="0.0" width="414" height="200"/>
<constraints>
<constraint firstAttribute="height" constant="200" id="qtq-sH-2GF"/>
</constraints>
</imageView>
<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">
<rect key="frame" x="20" y="220" width="374" height="34"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<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">
<rect key="frame" x="20" y="269" width="374" height="51"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b5L-BJ-bRd" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
<rect key="frame" x="20" y="335" width="374" height="0.0"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" id="Vf5-mh-mYl"/>
</constraints>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<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">
<rect key="frame" x="20" y="370" width="374" height="17"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p9P-ZR-ZC2" userLabel="Coupon View">
<rect key="frame" x="152.5" y="397" width="109.5" height="55"/>
<subviews>
<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">
<rect key="frame" x="20" y="13.5" width="69.5" height="28"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Bold" family="PF Square Sans Pro" pointSize="28"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.95686274510000002" green="0.95686274510000002" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="55" id="1EO-q8-orQ"/>
<constraint firstAttribute="trailing" secondItem="Bz3-cq-84d" secondAttribute="trailing" constant="20" id="HXC-0E-aSK"/>
<constraint firstItem="Bz3-cq-84d" firstAttribute="leading" secondItem="p9P-ZR-ZC2" secondAttribute="leading" constant="20" id="cs2-FC-J3v"/>
<constraint firstItem="Bz3-cq-84d" firstAttribute="centerY" secondItem="p9P-ZR-ZC2" secondAttribute="centerY" id="lQQ-qR-UUi"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ke2-PF-MgG" userLabel="Border View">
<rect key="frame" x="20" y="472" width="374" height="1"/>
<color key="backgroundColor" red="0.90196078430000004" green="0.90196078430000004" blue="0.90196078430000004" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="TtB-Ap-gwZ"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0e4-jR-gJ2">
<rect key="frame" x="30" y="483" width="354" height="110"/>
<constraints>
<constraint firstAttribute="height" constant="110" id="aLi-ff-Zln"/>
</constraints>
</imageView>
<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">
<rect key="frame" x="20" y="603" width="374" height="26.5"/>
<constraints>
<constraint firstAttribute="height" constant="26.5" id="9mu-aR-zqX"/>
</constraints>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="23"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HK5-Qt-OFZ" userLabel="Border 2 View">
<rect key="frame" x="20" y="644.5" width="374" height="1"/>
<color key="backgroundColor" red="0.90196078430000004" green="0.90196078430000004" blue="0.90196078430000004" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="cnC-Ua-jhC"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l3Z-rd-1se">
<rect key="frame" x="103.5" y="655.5" width="207" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="oi1-xW-7Ma"/>
</constraints>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" title="Εμφάνιση barcode" image="ic_down_dark">
<color key="titleColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<preferredSymbolConfiguration key="preferredSymbolConfiguration"/>
</state>
<connections>
<action selector="showBarcodeAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="PKS-vX-Eqy"/>
</connections>
</button>
<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">
<rect key="frame" x="20" y="740.5" width="374" height="15"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zaj-yW-yxb">
<rect key="frame" x="103.5" y="790.5" width="207" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="t7m-Bz-eEx"/>
</constraints>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" title="Εμφάνιση κουπονιών" image="ic_down_dark">
<color key="titleColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<preferredSymbolConfiguration key="preferredSymbolConfiguration"/>
</state>
<connections>
<action selector="showCouponsButtonAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="tU8-LY-Jau"/>
</connections>
</button>
<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">
<rect key="frame" x="0.0" y="855.5" width="414" height="200"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="200" id="Xet-4I-j1J"/>
</constraints>
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<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">
<rect key="frame" x="0.0" y="50" width="414" height="105"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TAK-Ug-AzU" id="LFe-Vj-kjJ">
<rect key="frame" x="0.0" y="0.0" width="414" height="105"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="35i-Iq-TId">
<rect key="frame" x="10" y="0.0" width="394" height="105"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupon_bg" translatesAutoresizingMaskIntoConstraints="NO" id="58G-jP-FMr">
<rect key="frame" x="0.0" y="0.0" width="394" height="105"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jcR-bh-Fhz">
<rect key="frame" x="20" y="10" width="79" height="85"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZDK-3b-8MQ">
<rect key="frame" x="104" y="5" width="10" height="95"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="sq7-pL-kd5"/>
</constraints>
</view>
<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">
<rect key="frame" x="119" y="15" width="255" height="17"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="NmF-B8-BxN">
<rect key="frame" x="119" y="37" width="255" height="31"/>
<subviews>
<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">
<rect key="frame" x="0.0" y="0.0" width="127.5" height="31"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Bold" family="PF Square Sans Pro" pointSize="31"/>
<color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<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">
<rect key="frame" x="132.5" y="0.0" width="122.5" height="31"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/>
<color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="9CO-TF-h6H" firstAttribute="width" secondItem="NmF-B8-BxN" secondAttribute="width" multiplier="0.5" id="U9S-Wy-bJ2"/>
</constraints>
</stackView>
<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">
<rect key="frame" x="119" y="78" width="255" height="12"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/>
<color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="NmF-B8-BxN" firstAttribute="centerY" secondItem="35i-Iq-TId" secondAttribute="centerY" id="2Ed-Nj-f6h"/>
<constraint firstAttribute="trailing" secondItem="mOO-dc-RyS" secondAttribute="trailing" constant="20" id="8Zl-md-YUY"/>
<constraint firstItem="jcR-bh-Fhz" firstAttribute="width" secondItem="35i-Iq-TId" secondAttribute="width" multiplier="0.2" id="8n1-lF-UlM"/>
<constraint firstItem="u51-sv-YiH" firstAttribute="leading" secondItem="ZDK-3b-8MQ" secondAttribute="trailing" constant="5" id="9pb-2H-f1h"/>
<constraint firstItem="ZDK-3b-8MQ" firstAttribute="top" secondItem="35i-Iq-TId" secondAttribute="top" constant="5" id="EEP-lx-N0t"/>
<constraint firstAttribute="bottom" secondItem="ZDK-3b-8MQ" secondAttribute="bottom" constant="5" id="FYp-0E-Uw0"/>
<constraint firstAttribute="bottom" secondItem="u51-sv-YiH" secondAttribute="bottom" constant="15" id="Flf-tQ-WhD"/>
<constraint firstAttribute="bottom" secondItem="58G-jP-FMr" secondAttribute="bottom" id="GSk-WB-Iet"/>
<constraint firstItem="58G-jP-FMr" firstAttribute="leading" secondItem="35i-Iq-TId" secondAttribute="leading" id="JCp-aq-cPq"/>
<constraint firstItem="jcR-bh-Fhz" firstAttribute="leading" secondItem="35i-Iq-TId" secondAttribute="leading" constant="20" id="L9F-dG-daa"/>
<constraint firstItem="58G-jP-FMr" firstAttribute="top" secondItem="35i-Iq-TId" secondAttribute="top" id="NDb-ma-RxF"/>
<constraint firstItem="ZDK-3b-8MQ" firstAttribute="leading" secondItem="jcR-bh-Fhz" secondAttribute="trailing" constant="5" id="NFe-FK-tFF"/>
<constraint firstItem="NmF-B8-BxN" firstAttribute="leading" secondItem="ZDK-3b-8MQ" secondAttribute="trailing" constant="5" id="QzX-xe-Gmc"/>
<constraint firstItem="u51-sv-YiH" firstAttribute="top" relation="greaterThanOrEqual" secondItem="NmF-B8-BxN" secondAttribute="bottom" constant="5" id="RUi-pY-M3y"/>
<constraint firstItem="jcR-bh-Fhz" firstAttribute="top" secondItem="35i-Iq-TId" secondAttribute="top" constant="10" id="W7a-RI-eFK"/>
<constraint firstAttribute="trailing" secondItem="NmF-B8-BxN" secondAttribute="trailing" constant="20" id="WXz-rG-ZBX"/>
<constraint firstItem="mOO-dc-RyS" firstAttribute="top" secondItem="35i-Iq-TId" secondAttribute="top" constant="15" id="bB4-81-G6R"/>
<constraint firstItem="mOO-dc-RyS" firstAttribute="leading" secondItem="ZDK-3b-8MQ" secondAttribute="trailing" constant="5" id="dfS-C5-yrS"/>
<constraint firstItem="NmF-B8-BxN" firstAttribute="top" relation="greaterThanOrEqual" secondItem="mOO-dc-RyS" secondAttribute="bottom" constant="5" id="hwb-y3-RPk"/>
<constraint firstAttribute="bottom" secondItem="jcR-bh-Fhz" secondAttribute="bottom" constant="10" id="jGC-H8-LPk"/>
<constraint firstAttribute="trailing" secondItem="58G-jP-FMr" secondAttribute="trailing" id="ndw-7x-qT3"/>
<constraint firstAttribute="trailing" secondItem="u51-sv-YiH" secondAttribute="trailing" constant="20" id="vZk-48-uaD"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="35i-Iq-TId" firstAttribute="leading" secondItem="LFe-Vj-kjJ" secondAttribute="leading" constant="10" id="3hq-3Z-4i8"/>
<constraint firstItem="35i-Iq-TId" firstAttribute="top" secondItem="LFe-Vj-kjJ" secondAttribute="top" id="Ex4-yD-ujb"/>
<constraint firstAttribute="trailing" secondItem="35i-Iq-TId" secondAttribute="trailing" constant="10" id="GdO-6L-lwn"/>
<constraint firstAttribute="bottom" secondItem="35i-Iq-TId" secondAttribute="bottom" id="Qim-cz-Ryu"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="borderView" destination="ZDK-3b-8MQ" id="qma-5l-a6k"/>
<outlet property="couponBgImage" destination="58G-jP-FMr" id="ax7-k5-OVV"/>
<outlet property="couponImage" destination="jcR-bh-Fhz" id="OSo-eQ-p6a"/>
<outlet property="dicountLabel" destination="9CO-TF-h6H" id="n8h-DI-pzv"/>
<outlet property="discriptionLabel" destination="XTf-q6-vau" id="0th-ti-mlx"/>
<outlet property="expirationLabel" destination="u51-sv-YiH" id="SLL-Xy-SY4"/>
<outlet property="nameLabel" destination="mOO-dc-RyS" id="zZp-my-uZI"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="kZo-uj-MVp" id="l5z-oz-swz"/>
<outlet property="delegate" destination="kZo-uj-MVp" id="Gfo-Do-Bkw"/>
</connections>
</tableView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NYi-ps-hZw">
<rect key="frame" x="139.5" y="1090.5" width="135" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="ERH-et-F0E"/>
</constraints>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Δες τα καταστήματα">
<color key="titleColor" red="0.31372549020000001" green="0.61960784310000006" blue="0.1843137255" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="mapButtonAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="LNC-9q-ejl"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qEo-pP-n0h">
<rect key="frame" x="103.5" y="1154.5" width="207" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="Noz-pm-Rmy"/>
</constraints>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" title="Όροι χρήσης" image="ic_down_dark">
<color key="titleColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<preferredSymbolConfiguration key="preferredSymbolConfiguration"/>
</state>
<connections>
<action selector="termsButtonAction:" destination="kZo-uj-MVp" eventType="touchUpInside" id="jTa-Ty-qFn"/>
</connections>
</button>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XRd-W8-YCf" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
<rect key="frame" x="20" y="1214.5" width="374" height="0.0"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" id="kUA-53-MNE"/>
</constraints>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="p9P-ZR-ZC2" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="h6B-3P-USu" secondAttribute="leading" constant="25" id="007-bh-Mq1"/>
<constraint firstAttribute="trailing" secondItem="HK5-Qt-OFZ" secondAttribute="trailing" constant="20" id="0Gv-bT-WxV"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="p9P-ZR-ZC2" secondAttribute="trailing" constant="25" id="1bd-sw-OGt"/>
<constraint firstAttribute="trailing" secondItem="XRd-W8-YCf" secondAttribute="trailing" constant="20" id="4sc-JD-hZm"/>
<constraint firstItem="Bmm-wl-752" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="54t-tD-9yM"/>
<constraint firstAttribute="trailing" secondItem="Ke2-PF-MgG" secondAttribute="trailing" constant="20" id="5uX-Lg-16f"/>
<constraint firstItem="qEo-pP-n0h" firstAttribute="width" secondItem="h6B-3P-USu" secondAttribute="width" multiplier="0.5" id="6Qm-94-CbZ"/>
<constraint firstAttribute="trailing" secondItem="Bmm-wl-752" secondAttribute="trailing" constant="20" id="74j-fN-F1a"/>
<constraint firstItem="jbu-lq-22w" firstAttribute="top" secondItem="h6B-3P-USu" secondAttribute="top" id="77S-EB-I9n"/>
<constraint firstItem="wB5-TH-zF6" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="7Xp-Hh-b7M"/>
<constraint firstItem="XRd-W8-YCf" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="Bjx-ym-XLB"/>
<constraint firstItem="qEo-pP-n0h" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="CKS-XP-QAN"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="qEo-pP-n0h" secondAttribute="bottom" constant="30" id="E3K-lI-LCA"/>
<constraint firstItem="0e4-jR-gJ2" firstAttribute="top" secondItem="Ke2-PF-MgG" secondAttribute="bottom" constant="10" id="FeW-6g-7nZ"/>
<constraint firstItem="p9P-ZR-ZC2" firstAttribute="top" secondItem="wB5-TH-zF6" secondAttribute="bottom" constant="10" id="G0T-2t-BKh"/>
<constraint firstItem="KcC-nd-UJt" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="GE8-CX-1fl"/>
<constraint firstItem="NYi-ps-hZw" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="GwJ-8P-npS"/>
<constraint firstItem="XEh-1k-bk7" firstAttribute="top" secondItem="jbu-lq-22w" secondAttribute="bottom" constant="20" id="HCb-Uz-CQC"/>
<constraint firstItem="XEh-1k-bk7" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="HRC-XR-2Z2"/>
<constraint firstItem="Bmm-wl-752" firstAttribute="top" secondItem="l3Z-rd-1se" secondAttribute="bottom" constant="35" id="HbV-nu-Hpt"/>
<constraint firstAttribute="trailing" secondItem="0e4-jR-gJ2" secondAttribute="trailing" constant="30" id="HxT-Ci-qXC"/>
<constraint firstItem="zaj-yW-yxb" firstAttribute="width" secondItem="h6B-3P-USu" secondAttribute="width" multiplier="0.5" id="Jak-kG-SlN"/>
<constraint firstItem="NYi-ps-hZw" firstAttribute="top" secondItem="Jsn-Je-71G" secondAttribute="bottom" constant="35" id="Jsa-kb-xSz"/>
<constraint firstItem="l3Z-rd-1se" firstAttribute="top" secondItem="HK5-Qt-OFZ" secondAttribute="bottom" constant="10" id="LiN-pJ-pjN"/>
<constraint firstAttribute="trailing" secondItem="KcC-nd-UJt" secondAttribute="trailing" constant="20" id="Mfx-q9-cuK"/>
<constraint firstItem="XRd-W8-YCf" firstAttribute="top" secondItem="qEo-pP-n0h" secondAttribute="bottom" constant="10" id="Nd4-Gg-uk1"/>
<constraint firstItem="HK5-Qt-OFZ" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="Nt2-qa-UoE"/>
<constraint firstItem="Jsn-Je-71G" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" id="O6Y-XK-nnc"/>
<constraint firstItem="z1U-JG-k4U" firstAttribute="top" secondItem="XEh-1k-bk7" secondAttribute="bottom" constant="15" id="OK6-wa-Ybp"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="XRd-W8-YCf" secondAttribute="bottom" constant="30" id="PqJ-aK-gFO"/>
<constraint firstItem="zaj-yW-yxb" firstAttribute="top" secondItem="Bmm-wl-752" secondAttribute="bottom" constant="35" id="QYD-3G-JMi"/>
<constraint firstAttribute="trailing" secondItem="wB5-TH-zF6" secondAttribute="trailing" constant="20" id="RUA-zf-2M5"/>
<constraint firstItem="p9P-ZR-ZC2" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="Roj-dQ-hYS"/>
<constraint firstItem="KcC-nd-UJt" firstAttribute="top" secondItem="0e4-jR-gJ2" secondAttribute="bottom" constant="10" id="SH6-4R-cCp"/>
<constraint firstAttribute="trailing" secondItem="Jsn-Je-71G" secondAttribute="trailing" id="SMG-d4-tot"/>
<constraint firstAttribute="trailing" secondItem="XEh-1k-bk7" secondAttribute="trailing" constant="20" id="XIz-C7-XrD"/>
<constraint firstItem="l3Z-rd-1se" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="YD9-GP-0ms"/>
<constraint firstItem="qEo-pP-n0h" firstAttribute="top" secondItem="NYi-ps-hZw" secondAttribute="bottom" constant="20" id="Zt9-R1-mr2"/>
<constraint firstItem="b5L-BJ-bRd" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="arK-Zd-Hgy"/>
<constraint firstItem="Ke2-PF-MgG" firstAttribute="top" secondItem="p9P-ZR-ZC2" secondAttribute="bottom" constant="20" id="cmv-I1-vKp"/>
<constraint firstItem="z1U-JG-k4U" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="cyH-Xu-zU6"/>
<constraint firstItem="wB5-TH-zF6" firstAttribute="top" secondItem="b5L-BJ-bRd" secondAttribute="bottom" constant="35" id="fR9-cP-N5X"/>
<constraint firstAttribute="trailing" secondItem="z1U-JG-k4U" secondAttribute="trailing" constant="20" id="ghn-UI-BtO"/>
<constraint firstAttribute="trailing" secondItem="b5L-BJ-bRd" secondAttribute="trailing" constant="20" id="iby-Dv-64i"/>
<constraint firstItem="Ke2-PF-MgG" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="20" id="jsN-8I-dDs"/>
<constraint firstAttribute="trailing" secondItem="jbu-lq-22w" secondAttribute="trailing" id="nZs-Mo-gQn"/>
<constraint firstItem="zaj-yW-yxb" firstAttribute="centerX" secondItem="h6B-3P-USu" secondAttribute="centerX" id="ner-V9-uet"/>
<constraint firstItem="jbu-lq-22w" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" id="nlJ-Jr-W1y"/>
<constraint firstItem="l3Z-rd-1se" firstAttribute="width" secondItem="h6B-3P-USu" secondAttribute="width" multiplier="0.5" id="pBD-ac-8QV"/>
<constraint firstItem="HK5-Qt-OFZ" firstAttribute="top" secondItem="KcC-nd-UJt" secondAttribute="bottom" constant="15" id="sjJ-5g-cKb"/>
<constraint firstItem="0e4-jR-gJ2" firstAttribute="leading" secondItem="h6B-3P-USu" secondAttribute="leading" constant="30" id="t1y-43-ggS"/>
<constraint firstItem="Jsn-Je-71G" firstAttribute="top" secondItem="zaj-yW-yxb" secondAttribute="bottom" constant="15" id="tP4-IY-o5w"/>
<constraint firstItem="b5L-BJ-bRd" firstAttribute="top" secondItem="z1U-JG-k4U" secondAttribute="bottom" constant="15" id="xxC-cP-Rv9"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="h6B-3P-USu" firstAttribute="top" secondItem="Bwm-0z-5fj" secondAttribute="top" id="0QV-nm-q49"/>
<constraint firstItem="h6B-3P-USu" firstAttribute="bottom" secondItem="Bwm-0z-5fj" secondAttribute="bottom" id="cMM-3m-nO7"/>
<constraint firstItem="h6B-3P-USu" firstAttribute="trailing" secondItem="Bwm-0z-5fj" secondAttribute="trailing" id="dHs-br-RnG"/>
<constraint firstItem="h6B-3P-USu" firstAttribute="width" secondItem="J9l-2m-hLG" secondAttribute="width" id="p3R-hD-ebm"/>
<constraint firstItem="h6B-3P-USu" firstAttribute="leading" secondItem="Bwm-0z-5fj" secondAttribute="leading" id="zDh-cb-g0k"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="Bwm-0z-5fj"/>
<viewLayoutGuide key="frameLayoutGuide" id="J9l-2m-hLG"/>
</scrollView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="k6Y-8d-5AX">
<rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="F2x-ch-ng3" secondAttribute="bottom" id="Bxi-Lf-m8N"/>
<constraint firstItem="h6B-3P-USu" firstAttribute="height" relation="greaterThanOrEqual" secondItem="1tN-9F-yxg" secondAttribute="height" id="JTm-bV-cw8"/>
<constraint firstItem="F2x-ch-ng3" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="Jos-cl-7VR"/>
<constraint firstItem="k6Y-8d-5AX" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="SIr-Hi-Dyx"/>
<constraint firstItem="F2x-ch-ng3" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="U0W-zW-DaZ"/>
<constraint firstAttribute="trailing" secondItem="F2x-ch-ng3" secondAttribute="trailing" id="fiO-e6-Uyi"/>
<constraint firstItem="Leh-kL-DF1" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="i78-sg-xrF"/>
<constraint firstAttribute="trailing" secondItem="k6Y-8d-5AX" secondAttribute="trailing" id="iXg-hc-zBk"/>
<constraint firstItem="Leh-kL-DF1" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="mcD-r4-3uU"/>
<constraint firstItem="k6Y-8d-5AX" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="o5b-Jd-fzM"/>
<constraint firstAttribute="trailing" secondItem="Leh-kL-DF1" secondAttribute="trailing" id="syn-qO-3hi"/>
<constraint firstAttribute="bottom" secondItem="Leh-kL-DF1" secondAttribute="bottom" id="uv2-fR-r9D"/>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="Leh-kL-DF1"/>
</mask>
</variation>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="fJk-Nc-evo"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="1tN-9F-yxg" secondAttribute="trailing" id="I64-hf-xQy"/>
<constraint firstItem="1tN-9F-yxg" firstAttribute="leading" secondItem="NDg-r8-0Mc" secondAttribute="leading" id="sM5-2E-86a"/>
<constraint firstItem="1tN-9F-yxg" firstAttribute="top" secondItem="fJk-Nc-evo" secondAttribute="top" id="vZT-Ke-CSL"/>
<constraint firstAttribute="bottom" secondItem="1tN-9F-yxg" secondAttribute="bottom" id="vsS-Bj-Vdx"/>
</constraints>
</view>
<connections>
<outlet property="backgroundImage" destination="Leh-kL-DF1" id="Yh4-J9-2fn"/>
<outlet property="barcodeImage" destination="0e4-jR-gJ2" id="K57-UT-nEz"/>
<outlet property="barcodeImageHeight" destination="aLi-ff-Zln" id="fmv-UO-1xh"/>
<outlet property="barcodeImageTopSpace" destination="FeW-6g-7nZ" id="geW-rH-Ncb"/>
<outlet property="barcodeLabel" destination="KcC-nd-UJt" id="nuA-M8-lfz"/>
<outlet property="barcodeLabelHeight" destination="9mu-aR-zqX" id="LkC-oC-uBB"/>
<outlet property="barcodeLabelTopSpace" destination="SH6-4R-cCp" id="Ika-Hf-UZJ"/>
<outlet property="border1TopSpace" destination="cmv-I1-vKp" id="uDK-md-rLQ"/>
<outlet property="border2TopSpace" destination="sjJ-5g-cKb" id="Irm-bW-hhb"/>
<outlet property="borderView2Height" destination="cnC-Ua-jhC" id="Sft-A8-tkZ"/>
<outlet property="borderViewHeight" destination="TtB-Ap-gwZ" id="8uH-4S-wv9"/>
<outlet property="couponImage" destination="jbu-lq-22w" id="S5m-GI-lAj"/>
<outlet property="couponImageHeight" destination="qtq-sH-2GF" id="deR-r5-eSP"/>
<outlet property="couponNumberLabel" destination="Bz3-cq-84d" id="4BL-AF-mRu"/>
<outlet property="couponView" destination="p9P-ZR-ZC2" id="eTA-tl-HKI"/>
<outlet property="discriptionLabel" destination="z1U-JG-k4U" id="svr-qs-rtD"/>
<outlet property="expirationLabel" destination="Bmm-wl-752" id="DjA-bw-ewR"/>
<outlet property="mainView" destination="1tN-9F-yxg" id="57p-Ru-90A"/>
<outlet property="mapButton" destination="NYi-ps-hZw" id="IgR-mN-HJO"/>
<outlet property="mapButtonHeight" destination="ERH-et-F0E" id="IrJ-ng-0OU"/>
<outlet property="mapButtonTopSpace" destination="Jsa-kb-xSz" id="a9I-wA-tqZ"/>
<outlet property="merchantDescrTextView" destination="b5L-BJ-bRd" id="FyS-oQ-cm4"/>
<outlet property="merchantDescrTextViewHeight" destination="Vf5-mh-mYl" id="FMX-nf-Q5b"/>
<outlet property="merchantDescrTextViewTopSpace" destination="xxC-cP-Rv9" id="2oC-LP-Qih"/>
<outlet property="nameLabel" destination="XEh-1k-bk7" id="z04-hZ-hkV"/>
<outlet property="scrollContentView" destination="h6B-3P-USu" id="MWb-in-8tj"/>
<outlet property="scrollView" destination="F2x-ch-ng3" id="dbe-Qt-LyZ"/>
<outlet property="showBarcodeButton" destination="l3Z-rd-1se" id="8M5-vy-RzO"/>
<outlet property="showBarcodeButtonHeight" destination="oi1-xW-7Ma" id="6lt-Ex-DuD"/>
<outlet property="showBarcodeButtonTopSpace" destination="LiN-pJ-pjN" id="aXh-ZZ-cWO"/>
<outlet property="showCouponsButton" destination="zaj-yW-yxb" id="gVY-xH-aMw"/>
<outlet property="tableView" destination="Jsn-Je-71G" id="mZF-SD-0R2"/>
<outlet property="tableViewHeight" destination="Xet-4I-j1J" id="4Ti-cu-FbZ"/>
<outlet property="termsButton" destination="qEo-pP-n0h" id="1QS-vK-40s"/>
<outlet property="termsTextView" destination="XRd-W8-YCf" id="Lad-5v-1WT"/>
<outlet property="termsTextViewHeight" destination="kUA-53-MNE" id="R1h-wF-gA7"/>
<outlet property="topBorderLine" destination="k6Y-8d-5AX" id="P78-tI-PAD"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ZLv-p2-P1H" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
......
......@@ -6,24 +6,563 @@
//
import UIKit
import RSBarcodes_Swift
import AVFoundation
// import SwiftEventBus
class UnifiedCouponBarcodeViewController: UIViewController {
final class ContentSizedTableView: UITableView {
override var contentSize:CGSize {
didSet {
invalidateIntrinsicContentSize()
}
}
override var intrinsicContentSize:CGSize {
layoutIfNeeded()
return CGSize(width: UIView.noIntrinsicMetric, height: contentSize.height)
}
}
//extension UIScrollView {
// func updateContentView() {
// contentSize.height = subviews.sorted(by: { $0.frame.maxY < $1.frame.maxY }).last?.frame.maxY ?? contentSize.height
// }
//}
extension UITableView {
func updateContentView() {
contentSize.height = subviews.sorted(by: { $0.frame.maxY < $1.frame.maxY }).last?.frame.maxY ?? contentSize.height
}
}
@objc public class UnifiedCouponBarcodeViewController: UIViewController, UITextViewDelegate {
@IBOutlet weak var mainView: UIView!
@IBOutlet weak var backgroundImage: UIImageView!
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var scrollContentView: UIView!
@IBOutlet weak var couponImage: UIImageView!
@IBOutlet weak var couponImageHeight: NSLayoutConstraint!
@IBOutlet weak var nameLabel: UILabel!
@IBOutlet weak var discriptionLabel: UILabel!
@IBOutlet weak var merchantDescrTextView: UnselectableTappableTextView!
@IBOutlet weak var merchantDescrTextViewHeight: NSLayoutConstraint!
@IBOutlet weak var merchantDescrTextViewTopSpace: NSLayoutConstraint!
@IBOutlet weak var couponView: UIView!
@IBOutlet weak var couponNumberLabel: CopyableLabel!
@IBOutlet weak var barcodeImage: UIImageView!
@IBOutlet weak var barcodeImageHeight: NSLayoutConstraint!
@IBOutlet weak var barcodeLabel: UILabel!
@IBOutlet weak var barcodeLabelHeight: NSLayoutConstraint!
@IBOutlet weak var showBarcodeButton: UIButton!
@IBOutlet weak var expirationLabel: UILabel!
@IBOutlet weak var termsButton: UIButton!
@IBOutlet weak var termsTextView: UnselectableTappableTextView!
@IBOutlet weak var termsTextViewHeight: NSLayoutConstraint!
@IBOutlet weak var borderViewHeight: NSLayoutConstraint!
@IBOutlet weak var borderView2Height: NSLayoutConstraint!
@IBOutlet weak var border1TopSpace: NSLayoutConstraint!
@IBOutlet weak var barcodeImageTopSpace: NSLayoutConstraint!
@IBOutlet weak var barcodeLabelTopSpace: NSLayoutConstraint!
@IBOutlet weak var border2TopSpace: NSLayoutConstraint!
@IBOutlet weak var mapButton: UIButton!
@IBOutlet weak var topBorderLine: UIImageView!
@IBOutlet weak var mapButtonHeight: NSLayoutConstraint!
@IBOutlet weak var mapButtonTopSpace: NSLayoutConstraint!
@IBOutlet weak var showBarcodeButtonHeight: NSLayoutConstraint!
@IBOutlet weak var showBarcodeButtonTopSpace: NSLayoutConstraint!
@IBOutlet weak var tableView: ContentSizedTableView!
@IBOutlet weak var tableViewHeight: NSLayoutConstraint!
@IBOutlet weak var showCouponsButton: UIButton!
let uiscreen: CGRect = UIScreen.main.bounds
var termsVisible: Bool = false;
var barcodeVisible: Bool = false;
var couponsVisible: Bool = false;
override func viewDidLoad() {
var mapBtnVisible: Bool = false;
var eshopBtnVisible: Bool = false;
var eshopWebsite: String = "";
public var coupon: swiftApi.UnifiedCouponModel?
public var isFromWallet: Bool? = false
public override func viewDidLoad() {
super.viewDidLoad()
self.hidesBottomBarWhenPushed = true
merchantDescrTextView.delegate = self
termsTextView.delegate = self
tableView.delegate = self
tableView.dataSource = self
// Do any additional setup after loading the view.
setBackButton()
setNavigationTitle("Εκπτωτικό κουπόνι")
// backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
// scrollView.clipsToBounds = true
// scrollView.layer.cornerRadius = 30
// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
var aspectR: CGFloat = 0.0
aspectR = image.size.width/image.size.height
topBorderLine.translatesAutoresizingMaskIntoConstraints = false
topBorderLine.image = image
topBorderLine.contentMode = .scaleAspectFill
NSLayoutConstraint.activate([
topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
])
// COUPONSET: desc, img_preview, name, terms
// COUPON: coupon, expiration, discount, status
// let couponSetData: swiftApi.CouponSetItemModel? = coupon?.couponset_data
// couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.image = UIImage(named: "market_bg", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = 230 // 253 // self.uiscreen.height * 0.25
nameLabel.text = "Εκπτωτικό κουπόνι COSMOTE SuperMarket Deals!"
discriptionLabel.text = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών."
merchantDescrTextView.text = ""
merchantDescrTextViewTopSpace.constant = CGFloat(0)
merchantDescrTextViewHeight.constant = CGFloat(0)
merchantDescrTextView.isHidden = true
// let merchantList:Array<swiftApi.MerchantModel> = swiftApi().getMerchantList()
// for merchant in merchantList {
// if (merchant._uuid == couponSetData?.merchant_uuid) {
// let htmlMerchDescrText = merchant._body
//
// if (htmlMerchDescrText != "") {
// merchantDescrTextView.attributedText = htmlMerchDescrText.htmlToAttributedString
// merchantDescrTextView.font = UIFont(name: "PFSquareSansPro-Regular", size: 17)
// merchantDescrTextView.textColor = UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00)
// merchantDescrTextView.textAlignment = .center
// merchantDescrTextView.isScrollEnabled = false
// merchantDescrTextView.isUserInteractionEnabled = true
// merchantDescrTextView.isEditable = false
// merchantDescrTextView.isSelectable = true
// merchantDescrTextView.dataDetectorTypes = [.link]
//
// merchantDescrTextView.isHidden = false
// merchantDescrTextViewTopSpace.constant = CGFloat(15)
// let targetSize = CGSize(width: merchantDescrTextView.frame.width, height: CGFloat(MAXFLOAT))
// merchantDescrTextViewHeight.constant = merchantDescrTextView.sizeThatFits(targetSize).height
// }
//
// break;
// }
// }
couponView.layer.cornerRadius = 8
couponNumberLabel.text = ((coupon?._code != 0) ? String(coupon?._code ?? 0) : "")
couponView.frame = CGRect(x: 0.0, y: 0.0, width: couponView.intrinsicContentSize.width, height: 55)
let barcodeString = constructBarcode() ?? ""
barcodeLabel.text = barcodeString
// Uncomment if Barcode Section is active again
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)) {
barcodeImage.image = barcodeUIImage
barcodeImageHeight.constant = self.uiscreen.height * 0.1
showBarcodeButton.isHidden = false
showBarcodeButtonHeight.constant = 50
showBarcodeButtonTopSpace.constant = 10
} else {
barcodeImageHeight.constant = 0
showBarcodeButton.isHidden = true
showBarcodeButtonHeight.constant = 0
showBarcodeButtonTopSpace.constant = 0
}
// === Hide Barcode Section
// barcodeImage.isHidden = true
// barcodeImageHeight.constant = CGFloat(0)
// barcodeLabel.isHidden = true
// barcodeLabelHeight.constant = CGFloat(0)
//
// borderViewHeight.constant = CGFloat(0)
// borderView2Height.constant = CGFloat(0)
//
// border1TopSpace.constant = CGFloat(0) // 20
// barcodeImageTopSpace.constant = CGFloat(0) // 10
// barcodeLabelTopSpace.constant = CGFloat(0) // 10
// border2TopSpace.constant = CGFloat(0) // 15
//
showBarcodeButton.isHidden = true
showBarcodeButtonHeight.constant = 0
showBarcodeButtonTopSpace.constant = 0
// ===
showBarcodeButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal)
showBarcodeButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal)
showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
showBarcodeButton.semanticContentAttribute = .forceRightToLeft
showBarcodeButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00)
showBarcodeButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
showBarcodeButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5);
showBarcodeButton.imageView?.layer.transform = CATransform3DMakeScale(0.8, 0.8, 0.8)
if let earliestExpiration = coupon?._coupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) {
expirationLabel.text = "Το κουπόνι ισχύει έως " + (earliestExpiration.expiration ?? "")
} else {
expirationLabel.text = ""
}
mapButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18)
mapButton.setTitle("Δες τα supermarket", for: .normal)
mapButton.setTitleColor(UIColor(red: 1.00, green: 1.00, blue: 1.00, alpha: 1.00), for: .normal)
mapButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
mapButton.layer.cornerRadius = 8.0
mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 44)
mapButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// mapButton.isHidden = true
// mapButtonHeight.constant = 0
// mapButtonTopSpace.constant = 0
// let merchantList:Array<swiftApi.MerchantModel> = swiftApi().getMerchantList()
// for merchant in merchantList {
// if (merchant._uuid == couponSetData?.merchant_uuid) {
// if (merchant._show_map == true) {
// mapButton.setTitle("Δες τα καταστήματα", for: .normal)
// mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 44)
// mapButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// mapButton.isHidden = false
// mapBtnVisible = true
// eshopBtnVisible = false
// mapButtonHeight.constant = 44
// mapButtonTopSpace.constant = 10
// } else if (merchant._eshop == true) {
// mapButton.setTitle("Δες το eshop", for: .normal)
// mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 44)
// mapButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// mapButton.isHidden = false
// mapBtnVisible = false
// eshopBtnVisible = true
// mapButtonHeight.constant = 44
// mapButtonTopSpace.constant = 10
// } else {
// mapButton.isHidden = true
// mapBtnVisible = false
// eshopBtnVisible = false
// mapButtonHeight.constant = 0
// mapButtonTopSpace.constant = 0
// }
// eshopWebsite = merchant._website
// break;
// }
// }
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
// // iPad
// mapButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
// } else {
// // not iPad (iPhone, mac, tv, carPlay, unspecified)
// mapButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
// }
showCouponsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16)
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
showCouponsButton.setTitle("Εμφάνιση κουπονιών", for: .normal)
showCouponsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal)
showCouponsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
showCouponsButton.semanticContentAttribute = .forceRightToLeft
showCouponsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00)
showCouponsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
showCouponsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5);
showCouponsButton.imageView?.layer.transform = CATransform3DMakeScale(0.8, 0.8, 0.8)
tableView.isScrollEnabled = false
tableView.isHidden = true
tableViewHeight.constant = CGFloat(0)
// tableView.isHidden = false
// let targetSize = CGSize(width: tableView.frame.width, height: CGFloat(MAXFLOAT))
// tableViewHeight.constant = tableView.sizeThatFits(targetSize).height
termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16)
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
termsButton.setTitle("Όροι χρήσης", for: .normal)
termsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
termsButton.semanticContentAttribute = .forceRightToLeft
termsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00)
termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
termsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5);
termsButton.imageView?.layer.transform = CATransform3DMakeScale(0.8, 0.8, 0.8)
let termsText = "1. Το εκπτωτικό κουπόνι ισχύει έως την ημερομηνία που αναφέρεται παραπάνω\n2. To εκπτωτικό κουπόνι αφορά στα ενεργά κουπόνια προσφορών όπως αναφέρονται παραπάνω.\n3. Το εκπτωτικό κουπόνι μπορεί να χρησιμοποιηθεί σε μια μόνο συναλλαγή.\n4. Εάν δεν γίνει χρήση ενός επιμέρους κουπονιού προσφοράς από το εκπτωτικό κουπόνι, το κουπόνι προσφοράς επιστρέφει στο καλάθι στην ενότητα COSMOTE SuperMarket Deals"
termsTextView.attributedText = NSAttributedString(string: termsText)
termsTextView.font = UIFont(name: "PFSquareSansPro-Regular", size: 15)
termsTextView.textColor = UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00)
termsTextView.textAlignment = .center
termsTextView.isScrollEnabled = false
termsTextView.isUserInteractionEnabled = true
termsTextView.isEditable = false
termsTextView.isSelectable = true
termsTextView.dataDetectorTypes = [.link]
// Uncomment if Barcode Section is active again
// toggleTerms()
// toggleBarcode()
// Logs
// print("Coupon: " + (coupon?.coupon ?? ""))
// print("Coupon Name: " + (couponSetData?.name ?? ""))
// print("Coupon Description: " + (couponSetData?.short_description ?? ""))
// print("Coupon Expiration: " + (coupon?.expiration ?? ""))
}
public override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
swiftApi().logTrackersEvent("screen", "UnifiedCouponScreen")
}
public func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
UIApplication.shared.open(URL)
// Disable `.preview` by 3D Touch and other interactions
return false
}
// MARK: - Functions
func toggleTerms() {
if (termsVisible) {
termsTextView.isHidden = false
let targetSize = CGSize(width: termsTextView.frame.width, height: CGFloat(MAXFLOAT))
termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height
termsButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
} else {
termsTextView.isHidden = true
termsTextViewHeight.constant = CGFloat(0)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
}
}
func toggleBarcode() {
if (barcodeVisible) {
barcodeImage.isHidden = false
if (barcodeImage.image == nil) {
barcodeImageHeight.constant = CGFloat(0)
} else {
barcodeImageHeight.constant = self.uiscreen.height * 0.1
}
barcodeLabel.isHidden = false
let targetSize = CGSize(width: barcodeLabel.frame.width, height: CGFloat(MAXFLOAT))
barcodeLabelHeight.constant = barcodeLabel.sizeThatFits(targetSize).height
borderViewHeight.constant = CGFloat(1)
borderView2Height.constant = CGFloat(1)
border1TopSpace.constant = CGFloat(20) // 20
barcodeImageTopSpace.constant = CGFloat(10) // 10
barcodeLabelTopSpace.constant = CGFloat(10) // 10
border2TopSpace.constant = CGFloat(15) // 15
showBarcodeButton.setTitle("Απόκρυψη barcode", for: .normal)
showBarcodeButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
} else {
barcodeImage.isHidden = true
barcodeImageHeight.constant = CGFloat(0)
barcodeLabel.isHidden = true
barcodeLabelHeight.constant = CGFloat(0)
borderViewHeight.constant = CGFloat(0)
borderView2Height.constant = CGFloat(0)
border1TopSpace.constant = CGFloat(0) // 20
barcodeImageTopSpace.constant = CGFloat(0) // 10
barcodeLabelTopSpace.constant = CGFloat(0) // 10
border2TopSpace.constant = CGFloat(0) // 15
showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal)
showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
}
}
func toggleCoupons() {
if (couponsVisible) {
tableView.isHidden = false
let targetSize = CGSize(width: tableView.frame.width, height: CGFloat(MAXFLOAT))
tableViewHeight.constant = tableView.sizeThatFits(targetSize).height
// tableViewHeight.constant = tableView.intrinsicContentSize.height
showCouponsButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
} else {
tableView.isHidden = true
tableViewHeight.constant = CGFloat(0)
showCouponsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
}
// scrollView.contentSize = CGSizeMake(scrollView.frame.size.width, scrollView.intrinsicContentSize.height);
// self.view.layoutIfNeeded()
// let targetSize = CGSize(width: scrollView.frame.width, height: CGFloat(MAXFLOAT))
// tableViewHeight.constant = tableView.sizeThatFits(targetSize).height
// scrollView.contentSize = CGSizeMake(scrollView.frame.size.width, CGFloat(MAXFLOAT));
// scrollView.updateContentView()
// tableView.updateContentView()
}
func constructBarcode() -> String? {
// EAN 13 barcode construction
// let couponData = coupon?.couponset_data
let couponString = coupon?._barcode ?? ""
if (!couponString.isEmpty) {
var checkDigit = 0;
var result = 0;
var fixedCouponCode = couponString;
if (fixedCouponCode.count < 12) {
let loops = 12 - fixedCouponCode.count;
var zerosStr = "";
for i in 0 ..< loops {
zerosStr += "0"
}
// fixedCouponCode = zerosStr + fixedCouponCode;
fixedCouponCode = fixedCouponCode + zerosStr;
}
/*
// MARK: - Navigation
var multiplier = 3;
for idx in (0 ... (fixedCouponCode.count - 1)).reversed() {
let curChar = fixedCouponCode[idx];
result += (Int(curChar) ?? 0) * multiplier;
multiplier = multiplier == 3 ? 1 : 3;
}
checkDigit = 10 - (result % 10);
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
let barcodeStr = fixedCouponCode + String(checkDigit);
return barcodeStr;
}
return ""
}
// MARK: - Actions
@IBAction func showCouponsButtonAction(_ sender: Any) {
couponsVisible = !couponsVisible
toggleCoupons()
}
@IBAction func showBarcodeAction(_ sender: Any) {
barcodeVisible = !barcodeVisible
toggleBarcode()
}
*/
@IBAction func termsButtonAction(_ sender: Any) {
termsVisible = !termsVisible
toggleTerms()
}
@IBAction func mapButtonAction(_ sender: Any) {
// swiftApi().logTrackersEvent("click", "SeeShops")
//
// let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self))
// vc.couponSet = coupon?.couponset_data
// self.navigationController?.pushViewController(vc, animated: true)
// if (mapBtnVisible == true) {
// swiftApi().logTrackersEvent("click", "SeeShops")
// let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self))
// vc.couponSet = coupon?.couponset_data
// self.navigationController?.pushViewController(vc, animated: true)
// } else if (eshopBtnVisible == true) {
// if (eshopWebsite != "") {
// guard let websiteUrl = URL(string: eshopWebsite) else {
// print("Error creating URL")
// return
// }
// // check if link can be opened.
// guard UIApplication.shared.canOpenURL(websiteUrl) else {
// return
// }
// swiftApi().logTrackersEvent("click", "SeeShopWebsite")
// UIApplication.shared.open(websiteUrl, options: [:], completionHandler: nil)
// }
// }
}
}
// MARK: - TableView
extension UnifiedCouponBarcodeViewController: UITableViewDelegate, UITableViewDataSource{
public func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.coupon?._coupons.count ?? 0
}
public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 120.0 + 8.0
// return UITableViewAutomaticDimension
}
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "CouponsTableViewCellId", for: indexPath) as! CouponsTableViewCell
cell.configureCell(coupon: (self.coupon?._coupons[indexPath.row])!)
return cell
}
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// SwiftEventBus.post("couponBarcodePressed", sender: coupons[indexPath.row])
// Logs
// let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data
// print("Coupon clicked: " + (coupons[indexPath.row].coupon ?? ""))
// print("Coupon Name clicked: " + (couponSetData?.name ?? ""))
// print("Coupon Description clicked: " + (couponSetData?.short_description ?? ""))
// print("Coupon Expiration clicked: " + (coupons[indexPath.row].expiration ?? ""))
// swiftApi().logTrackersEvent("click", ("Coupon:" + (couponSetData?.name ?? "")))
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
// let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController
// vc.coupon = self.coupon?._coupons[indexPath.row]
// self.navigationController?.pushViewController(vc, animated: true)
}
}
......
......@@ -845,16 +845,16 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
// Do nothing
} else if (indexPath.section == 1) {
// TODO: open unified CouponBarcodeViewController
// TODO: Add trackers
// let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data
// let couponName = couponSetData?.name ?? ""
// swiftApi().logTrackersEvent("click", ("Coupon:" + couponName))
//
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
// let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController
// vc.coupon = coupons[indexPath.row]
// vc.isFromWallet = true
// self.navigationController?.pushViewController(vc, animated: true)
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponBarcodeViewController") as! SwiftWarplyFramework.UnifiedCouponBarcodeViewController
vc.coupon = unifiedCoupons[indexPath.row]
vc.isFromWallet = true
self.navigationController?.pushViewController(vc, animated: true)
} else if (indexPath.section == 2) {
print("Active DFY coupon banner Tapped!")
......