Manos Chorianopoulos

UnifiedCouponBarcodeVC refactor

......@@ -92,4 +92,36 @@ import UIKit
expirationLabel.text = "Ισχύει έως "+(coupon.expiration ?? "")
}
func configureCell(coupon: swiftApi.CouponItemModel, isMarket: Bool) {
// COUPONSET: desc, img_preview, name, terms, merchant_uuid
// COUPON: coupon, expiration, discount, status
// MERCHANT: _img_preview,_admin_name
let merchantList:Array<swiftApi.MerchantModel> = swiftApi().getMerchantList()
nameLabel.text = ""
for merchant in merchantList {
if (merchant._uuid == coupon.merchant_uuid) {
// couponImage.load(link: merchant._img_preview, placeholder: UIImage(), cache: URLCache())
self.postImageURL = merchant._img_preview
nameLabel.text = merchant._admin_name
break;
}
}
// let priceFloat = Float(round(100 * (Float(coupon.discount ?? "0.0") ?? 0.0 )) / 100)
// var priceString = "0"
// priceString = String(format: "%.2f", priceFloat).replacingOccurrences(of: ".", with: ",", options: .literal, range: nil)
// dicountLabel.text = priceString + "€"
dicountLabel.text = (coupon.discount ?? "").replacingOccurrences(of: ".", with: ",", options: .literal, range: nil) + "€"
let htmlText = coupon.inner_text ?? ""
discriptionLabel.text = htmlText.htmlToString
// discriptionLabel.text = coupon.inner_text ?? ""
expirationLabel.text = "Ισχύει έως "+(coupon.expiration ?? "")
}
}
......
......@@ -2395,7 +2395,415 @@
<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">
<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">
<rect key="frame" x="0.0" y="0.0" width="414" height="848"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponBCHeaderTableViewCell" id="1eX-19-ysb" customClass="UnifiedCouponBCHeaderTableViewCell" customModule="SwiftWarplyFramework">
<rect key="frame" x="0.0" y="50" width="414" height="847.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="1eX-19-ysb" id="izt-1Z-wey">
<rect key="frame" x="0.0" y="0.0" width="414" height="847.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zYD-ey-wun">
<rect key="frame" x="0.0" y="0.0" width="414" height="847.5"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="4Aj-WZ-M9m">
<rect key="frame" x="0.0" y="0.0" width="414" height="200"/>
<constraints>
<constraint firstAttribute="height" constant="200" id="Rry-Lx-vaT"/>
</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="KgC-mB-kHF">
<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="7Ha-h1-G5Y">
<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="luU-pw-7jY" 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="39U-OF-0bK"/>
</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="tPn-a8-bAr">
<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="M7m-4Y-3sb" 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="MZf-Ul-AV4" 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="trailing" secondItem="MZf-Ul-AV4" secondAttribute="trailing" constant="20" id="9Ig-hZ-g1z"/>
<constraint firstAttribute="height" constant="55" id="Tda-JD-yaT"/>
<constraint firstItem="MZf-Ul-AV4" firstAttribute="centerY" secondItem="M7m-4Y-3sb" secondAttribute="centerY" id="Ukq-Rq-TJY"/>
<constraint firstItem="MZf-Ul-AV4" firstAttribute="leading" secondItem="M7m-4Y-3sb" secondAttribute="leading" constant="20" id="jwe-fF-Ccc"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="buX-G2-IsB" 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="gkk-5l-4a7"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9Cx-1R-FqG">
<rect key="frame" x="30" y="483" width="354" height="110"/>
<constraints>
<constraint firstAttribute="height" constant="110" id="mj2-dJ-YJB"/>
</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="iDt-Pz-bkd">
<rect key="frame" x="20" y="603" width="374" height="26.5"/>
<constraints>
<constraint firstAttribute="height" constant="26.5" id="QYZ-L4-ggJ"/>
</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="33M-UT-Ysb" 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="6LJ-d0-AsC"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UR2-dr-Wbn">
<rect key="frame" x="103.5" y="655.5" width="207" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="AMS-Hv-WqS"/>
</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="fUw-PO-Fvb"/>
</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="SPU-J6-4re">
<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="52P-0b-ua5">
<rect key="frame" x="103.5" y="790.5" width="207" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="W45-Tv-hXa"/>
</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="gop-Nw-AmG"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="9Cx-1R-FqG" secondAttribute="trailing" constant="30" id="0jS-yz-vb2"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="M7m-4Y-3sb" secondAttribute="trailing" constant="25" id="1VR-NJ-TLh"/>
<constraint firstItem="52P-0b-ua5" firstAttribute="centerX" secondItem="zYD-ey-wun" secondAttribute="centerX" id="26g-TF-9LY"/>
<constraint firstItem="9Cx-1R-FqG" firstAttribute="top" secondItem="buX-G2-IsB" secondAttribute="bottom" constant="10" id="5io-Ff-7sM"/>
<constraint firstItem="52P-0b-ua5" firstAttribute="top" secondItem="SPU-J6-4re" secondAttribute="bottom" constant="35" id="8b4-N3-C1R"/>
<constraint firstItem="4Aj-WZ-M9m" firstAttribute="top" secondItem="zYD-ey-wun" secondAttribute="top" id="Ayu-ib-gjs"/>
<constraint firstItem="UR2-dr-Wbn" firstAttribute="centerX" secondItem="zYD-ey-wun" secondAttribute="centerX" id="FMI-DW-GAW"/>
<constraint firstItem="buX-G2-IsB" firstAttribute="top" secondItem="M7m-4Y-3sb" secondAttribute="bottom" constant="20" id="Iw4-aA-F5T"/>
<constraint firstAttribute="trailing" secondItem="7Ha-h1-G5Y" secondAttribute="trailing" constant="20" id="JCb-Z3-NVb"/>
<constraint firstItem="33M-UT-Ysb" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="Oe2-NA-u35"/>
<constraint firstItem="7Ha-h1-G5Y" firstAttribute="top" secondItem="KgC-mB-kHF" secondAttribute="bottom" constant="15" id="OkX-gf-S8Z"/>
<constraint firstItem="52P-0b-ua5" firstAttribute="width" secondItem="zYD-ey-wun" secondAttribute="width" multiplier="0.5" id="OpZ-1t-VZF"/>
<constraint firstItem="9Cx-1R-FqG" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="30" id="RS0-3d-Ahq"/>
<constraint firstAttribute="trailing" secondItem="luU-pw-7jY" secondAttribute="trailing" constant="20" id="TVb-zK-d3G"/>
<constraint firstAttribute="trailing" secondItem="SPU-J6-4re" secondAttribute="trailing" constant="20" id="Trv-gg-FoN"/>
<constraint firstItem="KgC-mB-kHF" firstAttribute="top" secondItem="4Aj-WZ-M9m" secondAttribute="bottom" constant="20" id="WZ7-DH-nM7"/>
<constraint firstItem="tPn-a8-bAr" firstAttribute="top" secondItem="luU-pw-7jY" secondAttribute="bottom" constant="35" id="YS0-hx-VrC"/>
<constraint firstAttribute="bottom" secondItem="52P-0b-ua5" secondAttribute="bottom" constant="7" id="aGR-AH-Q5m"/>
<constraint firstItem="iDt-Pz-bkd" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="bia-J6-azS"/>
<constraint firstAttribute="trailing" secondItem="iDt-Pz-bkd" secondAttribute="trailing" constant="20" id="bvX-10-VV2"/>
<constraint firstItem="luU-pw-7jY" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="clz-47-TRg"/>
<constraint firstItem="M7m-4Y-3sb" firstAttribute="top" secondItem="tPn-a8-bAr" secondAttribute="bottom" constant="10" id="cq6-gd-84K"/>
<constraint firstAttribute="trailing" secondItem="KgC-mB-kHF" secondAttribute="trailing" constant="20" id="cri-UB-euq"/>
<constraint firstItem="buX-G2-IsB" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="dQG-Iv-2mF"/>
<constraint firstAttribute="trailing" secondItem="tPn-a8-bAr" secondAttribute="trailing" constant="20" id="flp-1C-pQq"/>
<constraint firstAttribute="trailing" secondItem="33M-UT-Ysb" secondAttribute="trailing" constant="20" id="g4k-tb-QBS"/>
<constraint firstItem="M7m-4Y-3sb" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="zYD-ey-wun" secondAttribute="leading" constant="25" id="g5Z-C9-qAx"/>
<constraint firstAttribute="trailing" secondItem="4Aj-WZ-M9m" secondAttribute="trailing" id="gLk-cl-axe"/>
<constraint firstItem="SPU-J6-4re" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="hCc-Tr-Qp1"/>
<constraint firstItem="SPU-J6-4re" firstAttribute="top" secondItem="UR2-dr-Wbn" secondAttribute="bottom" constant="35" id="jHO-Hi-OWu"/>
<constraint firstItem="tPn-a8-bAr" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="jb4-Tg-SNY"/>
<constraint firstItem="7Ha-h1-G5Y" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="k8g-e4-O7U"/>
<constraint firstAttribute="trailing" secondItem="buX-G2-IsB" secondAttribute="trailing" constant="20" id="kST-Yk-neW"/>
<constraint firstItem="UR2-dr-Wbn" firstAttribute="top" secondItem="33M-UT-Ysb" secondAttribute="bottom" constant="10" id="nN5-wY-oJP"/>
<constraint firstItem="UR2-dr-Wbn" firstAttribute="width" secondItem="zYD-ey-wun" secondAttribute="width" multiplier="0.5" id="o1b-zQ-HTX"/>
<constraint firstItem="luU-pw-7jY" firstAttribute="top" secondItem="7Ha-h1-G5Y" secondAttribute="bottom" constant="15" id="ojv-Ev-sPj"/>
<constraint firstItem="iDt-Pz-bkd" firstAttribute="top" secondItem="9Cx-1R-FqG" secondAttribute="bottom" constant="10" id="pxJ-dc-Duf"/>
<constraint firstItem="4Aj-WZ-M9m" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" id="rdH-Q3-LPg"/>
<constraint firstItem="M7m-4Y-3sb" firstAttribute="centerX" secondItem="zYD-ey-wun" secondAttribute="centerX" id="u6h-Gd-lQ0"/>
<constraint firstItem="KgC-mB-kHF" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="w4n-nG-Bmg"/>
<constraint firstItem="33M-UT-Ysb" firstAttribute="top" secondItem="iDt-Pz-bkd" secondAttribute="bottom" constant="15" id="z2q-JF-fHL"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="zYD-ey-wun" firstAttribute="leading" secondItem="izt-1Z-wey" secondAttribute="leading" id="c1U-Ne-oBC"/>
<constraint firstItem="zYD-ey-wun" firstAttribute="top" secondItem="izt-1Z-wey" secondAttribute="top" id="hfh-0q-qBS"/>
<constraint firstAttribute="bottom" secondItem="zYD-ey-wun" secondAttribute="bottom" id="i6X-4x-Ejn"/>
<constraint firstAttribute="trailing" secondItem="zYD-ey-wun" secondAttribute="trailing" id="t9Z-Nr-dbd"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="barcodeImage" destination="9Cx-1R-FqG" id="kFy-op-2Za"/>
<outlet property="barcodeImageHeight" destination="mj2-dJ-YJB" id="EQd-n6-P5M"/>
<outlet property="barcodeImageTopSpace" destination="5io-Ff-7sM" id="lzh-3v-M7r"/>
<outlet property="barcodeLabel" destination="iDt-Pz-bkd" id="lwj-xv-Bd6"/>
<outlet property="barcodeLabelHeight" destination="QYZ-L4-ggJ" id="BBe-OE-z8O"/>
<outlet property="barcodeLabelTopSpace" destination="pxJ-dc-Duf" id="lun-u9-sCh"/>
<outlet property="border1TopSpace" destination="Iw4-aA-F5T" id="O7z-2F-IWN"/>
<outlet property="border2TopSpace" destination="z2q-JF-fHL" id="z8h-Ne-JVG"/>
<outlet property="borderView2Height" destination="6LJ-d0-AsC" id="nsp-Jf-KCE"/>
<outlet property="borderViewHeight" destination="gkk-5l-4a7" id="ON5-ad-VUv"/>
<outlet property="couponImage" destination="4Aj-WZ-M9m" id="285-ot-S5h"/>
<outlet property="couponImageHeight" destination="Rry-Lx-vaT" id="bYq-PP-ITF"/>
<outlet property="couponNumberLabel" destination="MZf-Ul-AV4" id="ah0-eX-b1a"/>
<outlet property="couponView" destination="M7m-4Y-3sb" id="20v-0s-SfW"/>
<outlet property="discriptionLabel" destination="7Ha-h1-G5Y" id="oNw-pp-qnj"/>
<outlet property="expirationLabel" destination="SPU-J6-4re" id="ZIy-s4-3DR"/>
<outlet property="merchantDescrTextView" destination="luU-pw-7jY" id="mkD-Hy-1NP"/>
<outlet property="merchantDescrTextViewHeight" destination="39U-OF-0bK" id="Gbd-EF-Mcs"/>
<outlet property="merchantDescrTextViewTopSpace" destination="ojv-Ev-sPj" id="D23-Yk-943"/>
<outlet property="nameLabel" destination="KgC-mB-kHF" id="ePH-La-hzB"/>
<outlet property="showBarcodeButton" destination="UR2-dr-Wbn" id="cig-Mm-XUP"/>
<outlet property="showBarcodeButtonHeight" destination="AMS-Hv-WqS" id="XWW-LD-FBz"/>
<outlet property="showBarcodeButtonTopSpace" destination="nN5-wY-oJP" id="lrD-fJ-0MP"/>
<outlet property="showCouponsButton" destination="52P-0b-ua5" id="0RA-aj-lED"/>
</connections>
</tableViewCell>
<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="897.5" width="414" height="110"/>
<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="110"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="35i-Iq-TId">
<rect key="frame" x="10" y="5" 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" constant="5" 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>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponBCFooterTableViewCell" id="LD5-ES-J67" customClass="UnifiedCouponBCFooterTableViewCell" customModule="SwiftWarplyFramework">
<rect key="frame" x="0.0" y="1007.5" width="414" height="189"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LD5-ES-J67" id="DmN-AA-8n5">
<rect key="frame" x="0.0" y="0.0" width="414" height="189"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L4W-1e-9fQ">
<rect key="frame" x="0.0" y="0.0" width="414" height="189"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kdi-w7-eKZ">
<rect key="frame" x="139.5" y="35" width="135" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="SUG-HC-XQH"/>
</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="jm9-HG-8Sd"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Sq7-ea-Nx2">
<rect key="frame" x="103.5" y="99" width="207" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="UgG-aB-OOw"/>
</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="uVR-we-dTL"/>
</connections>
</button>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kkr-9H-ZSx" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
<rect key="frame" x="20" y="159" width="374" height="0.0"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" id="oLt-F6-WA7"/>
</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" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Kdi-w7-eKZ" firstAttribute="top" secondItem="L4W-1e-9fQ" secondAttribute="top" constant="35" id="1IM-rZ-u2k"/>
<constraint firstItem="Sq7-ea-Nx2" firstAttribute="top" secondItem="Kdi-w7-eKZ" secondAttribute="bottom" constant="20" id="1Qv-cX-6D8"/>
<constraint firstItem="Kkr-9H-ZSx" firstAttribute="leading" secondItem="L4W-1e-9fQ" secondAttribute="leading" constant="20" id="7pl-xk-jHX"/>
<constraint firstAttribute="trailing" secondItem="Kkr-9H-ZSx" secondAttribute="trailing" constant="20" id="VBo-Kj-h0s"/>
<constraint firstItem="Kkr-9H-ZSx" firstAttribute="top" secondItem="Sq7-ea-Nx2" secondAttribute="bottom" constant="10" id="jsT-BU-52c"/>
<constraint firstItem="Sq7-ea-Nx2" firstAttribute="width" secondItem="L4W-1e-9fQ" secondAttribute="width" multiplier="0.5" id="ljh-1k-pkA"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Sq7-ea-Nx2" secondAttribute="bottom" constant="30" id="nmp-6u-Pr6"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Kkr-9H-ZSx" secondAttribute="bottom" constant="30" id="ocv-GL-D9I"/>
<constraint firstItem="Sq7-ea-Nx2" firstAttribute="centerX" secondItem="L4W-1e-9fQ" secondAttribute="centerX" id="oiI-gL-Abw"/>
<constraint firstItem="Kdi-w7-eKZ" firstAttribute="centerX" secondItem="L4W-1e-9fQ" secondAttribute="centerX" id="rYZ-ny-Q3u"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="L4W-1e-9fQ" secondAttribute="trailing" id="NuR-2I-6QL"/>
<constraint firstAttribute="bottom" secondItem="L4W-1e-9fQ" secondAttribute="bottom" id="UKr-8J-bMe"/>
<constraint firstItem="L4W-1e-9fQ" firstAttribute="leading" secondItem="DmN-AA-8n5" secondAttribute="leading" id="aDO-dT-wAe"/>
<constraint firstItem="L4W-1e-9fQ" firstAttribute="top" secondItem="DmN-AA-8n5" secondAttribute="top" id="kKo-Pp-dmW"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="mapButton" destination="Kdi-w7-eKZ" id="DIH-nr-baa"/>
<outlet property="mapButtonHeight" destination="SUG-HC-XQH" id="GRr-Cz-ZUP"/>
<outlet property="mapButtonTopSpace" destination="1IM-rZ-u2k" id="Maj-hs-eqg"/>
<outlet property="termsButton" destination="Sq7-ea-Nx2" id="f8P-rg-tmQ"/>
<outlet property="termsTextView" destination="Kkr-9H-ZSx" id="f1r-xJ-Q7O"/>
<outlet property="termsTextViewHeight" destination="oLt-F6-WA7" id="QBF-CX-6AP"/>
</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>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" 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">
......@@ -2518,126 +2926,8 @@
<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"/>
<button opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NYi-ps-hZw">
<rect key="frame" x="139.5" y="1110.5" width="135" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="ERH-et-F0E"/>
</constraints>
......@@ -2650,8 +2940,8 @@
<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"/>
<button opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qEo-pP-n0h">
<rect key="frame" x="103.5" y="1174.5" width="207" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="Noz-pm-Rmy"/>
</constraints>
......@@ -2665,8 +2955,8 @@
<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"/>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XRd-W8-YCf" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
<rect key="frame" x="20" y="1234.5" width="374" height="0.0"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" id="kUA-53-MNE"/>
......@@ -2700,19 +2990,16 @@
<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"/>
......@@ -2729,7 +3016,6 @@
<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>
......@@ -2753,9 +3039,13 @@
<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="Jsn-Je-71G" firstAttribute="top" secondItem="1tN-9F-yxg" secondAttribute="top" id="KbP-p7-cQj"/>
<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 firstItem="Jsn-Je-71G" firstAttribute="leading" secondItem="1tN-9F-yxg" secondAttribute="leading" id="UYc-62-g5M"/>
<constraint firstAttribute="trailing" secondItem="Jsn-Je-71G" secondAttribute="trailing" id="Vqx-91-Gax"/>
<constraint firstAttribute="trailing" secondItem="F2x-ch-ng3" secondAttribute="trailing" id="fiO-e6-Uyi"/>
<constraint firstAttribute="bottom" secondItem="Jsn-Je-71G" secondAttribute="bottom" id="hCl-yM-7aq"/>
<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"/>
......@@ -2766,6 +3056,7 @@
<variation key="default">
<mask key="subviews">
<exclude reference="Leh-kL-DF1"/>
<exclude reference="F2x-ch-ng3"/>
</mask>
</variation>
</view>
......@@ -2800,7 +3091,6 @@
<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"/>
......@@ -2812,7 +3102,6 @@
<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"/>
......
......@@ -6,12 +6,102 @@
//
import UIKit
//import RSBarcodes_Swift
import AVFoundation
// import SwiftEventBus
@objc public class UnifiedCouponBCFooterTableViewCell: UITableViewCell {
@objc public class UnifiedCouponBCFooterTableViewCell: UITableViewCell, UITextViewDelegate {
@IBOutlet weak var termsButton: UIButton!
@IBOutlet weak var termsTextView: UnselectableTappableTextView!
@IBOutlet weak var termsTextViewHeight: NSLayoutConstraint!
@IBOutlet weak var mapButton: UIButton!
@IBOutlet weak var mapButtonHeight: NSLayoutConstraint!
@IBOutlet weak var mapButtonTopSpace: NSLayoutConstraint!
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
termsTextView.delegate = self
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
// }
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]
}
public override func setSelected(_ selected: Bool, animated: Bool) {
......@@ -19,5 +109,31 @@ import UIKit
// Configure the view for the selected state
}
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
}
func configureCell(termsVisible: Bool) {
toggleTerms(termsVisible: termsVisible)
}
func toggleTerms(termsVisible: Bool) {
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)
}
}
}
......
......@@ -6,12 +6,111 @@
//
import UIKit
import RSBarcodes_Swift
import AVFoundation
// import SwiftEventBus
@objc public class UnifiedCouponBCHeaderTableViewCell: UITableViewCell {
@objc public class UnifiedCouponBCHeaderTableViewCell: UITableViewCell, UITextViewDelegate {
@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 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 showBarcodeButtonHeight: NSLayoutConstraint!
@IBOutlet weak var showBarcodeButtonTopSpace: NSLayoutConstraint!
@IBOutlet weak var showCouponsButton: UIButton!
let uiscreen: CGRect = UIScreen.main.bounds
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
merchantDescrTextView.delegate = self
// 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;
// }
// }
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)
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)
}
public override func setSelected(_ selected: Bool, animated: Bool) {
......@@ -19,5 +118,154 @@ import UIKit
// Configure the view for the selected state
}
func configureCell(coupon: swiftApi.UnifiedCouponModel?, couponsVisible: Bool) {
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(coupon: coupon) ?? ""
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
// ===
if let earliestExpiration = coupon?._coupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) {
expirationLabel.text = "Το κουπόνι ισχύει έως " + (earliestExpiration.expiration ?? "")
} else {
expirationLabel.text = ""
}
toggleCoupons(couponsVisible: couponsVisible)
}
func constructBarcode(coupon: swiftApi.UnifiedCouponModel?) -> 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;
}
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);
let barcodeStr = fixedCouponCode + String(checkDigit);
return barcodeStr;
}
return ""
}
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
}
func toggleBarcode(barcodeVisible: Bool) {
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(couponsVisible: Bool) {
if (couponsVisible) {
showCouponsButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
} else {
showCouponsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
}
}
}
......
......@@ -70,7 +70,7 @@ extension UITableView {
@IBOutlet weak var mapButtonTopSpace: NSLayoutConstraint!
@IBOutlet weak var showBarcodeButtonHeight: NSLayoutConstraint!
@IBOutlet weak var showBarcodeButtonTopSpace: NSLayoutConstraint!
@IBOutlet weak var tableView: ContentSizedTableView!
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var tableViewHeight: NSLayoutConstraint!
@IBOutlet weak var showCouponsButton: UIButton!
......@@ -296,9 +296,9 @@ extension UITableView {
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.isScrollEnabled = false
// tableView.isHidden = true
// tableViewHeight.constant = CGFloat(0)
// tableView.isHidden = false
// let targetSize = CGSize(width: tableView.frame.width, height: CGFloat(MAXFLOAT))
......@@ -476,17 +476,23 @@ extension UITableView {
// MARK: - Actions
@IBAction func showCouponsButtonAction(_ sender: Any) {
couponsVisible = !couponsVisible
toggleCoupons()
// self.tableView.reloadSections(IndexSet(0..<2), with: .none)
self.tableView.reloadData()
// toggleCoupons()
}
@IBAction func showBarcodeAction(_ sender: Any) {
barcodeVisible = !barcodeVisible
toggleBarcode()
// self.tableView.reloadSections(IndexSet(integer: 0), with: .none)
self.tableView.reloadData()
// toggleBarcode()
}
@IBAction func termsButtonAction(_ sender: Any) {
termsVisible = !termsVisible
toggleTerms()
// self.tableView.reloadSections(IndexSet(integer: 2), with: .none)
self.tableView.reloadData()
// toggleTerms()
}
@IBAction func mapButtonAction(_ sender: Any) {
......@@ -526,24 +532,73 @@ extension UITableView {
extension UnifiedCouponBarcodeViewController: UITableViewDelegate, UITableViewDataSource{
public func numberOfSections(in tableView: UITableView) -> Int {
return 1
return 3
}
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.coupon?._coupons.count ?? 0
if (section == 0) {
return 1
} else if (section == 1) {
if (couponsVisible == true) {
return self.coupon?._coupons.count ?? 0
} else {
return 0
}
} else if (section == 2) {
return 1
} else {
return 0
}
}
public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 120.0 + 8.0
// return UITableViewAutomaticDimension
if (indexPath.section == 0) {
return UITableView.automaticDimension
} else if (indexPath.section == 1) {
if (couponsVisible == true) {
return 120.0 + 8.0
} else {
return 0.0
}
} else if (indexPath.section == 2) {
return UITableView.automaticDimension
} else {
return 0.0
}
}
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
if (indexPath.section == 0) {
let cell = tableView.dequeueReusableCell(withIdentifier: "UnifiedCouponBCHeaderTableViewCell", for: indexPath) as! UnifiedCouponBCHeaderTableViewCell
cell.configureCell(coupon: self.coupon, couponsVisible: couponsVisible)
return cell
} else if (indexPath.section == 1) {
let cell = tableView.dequeueReusableCell(withIdentifier: "CouponsTableViewCellId", for: indexPath) as! CouponsTableViewCell
cell.configureCell(coupon: (self.coupon?._coupons[indexPath.row])!, isMarket: true)
// cell.couponBgImage.image = UIImage(named: "coupon_bg_shadow", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
cell.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.16).cgColor
cell.layer.shadowOffset = CGSize(width: 0.0, height: 0.0)
cell.layer.shadowOpacity = 1.0
cell.layer.shadowRadius = 6.0
return cell
} else {
let cell = tableView.dequeueReusableCell(withIdentifier: "UnifiedCouponBCFooterTableViewCell", for: indexPath) as! UnifiedCouponBCFooterTableViewCell
cell.configureCell(termsVisible: termsVisible)
return cell
}
}
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......