Manos Chorianopoulos

add spinner at WalletVC

...@@ -2274,23 +2274,23 @@ ...@@ -2274,23 +2274,23 @@
2274 </connections> 2274 </connections>
2275 </tableViewCell> 2275 </tableViewCell>
2276 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponsTableViewCellId" id="DUH-nG-QWi" customClass="UnifiedCouponsTableViewCell" customModule="SwiftWarplyFramework"> 2276 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponsTableViewCellId" id="DUH-nG-QWi" customClass="UnifiedCouponsTableViewCell" customModule="SwiftWarplyFramework">
2277 - <rect key="frame" x="0.0" y="883" width="414" height="64.5"/> 2277 + <rect key="frame" x="0.0" y="883" width="414" height="44"/>
2278 <autoresizingMask key="autoresizingMask"/> 2278 <autoresizingMask key="autoresizingMask"/>
2279 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="DUH-nG-QWi" id="rx6-wA-MYI"> 2279 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="DUH-nG-QWi" id="rx6-wA-MYI">
2280 - <rect key="frame" x="0.0" y="0.0" width="414" height="64.5"/> 2280 + <rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
2281 <autoresizingMask key="autoresizingMask"/> 2281 <autoresizingMask key="autoresizingMask"/>
2282 <subviews> 2282 <subviews>
2283 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WW2-mP-ZJD"> 2283 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WW2-mP-ZJD">
2284 - <rect key="frame" x="10" y="0.0" width="394" height="64.5"/> 2284 + <rect key="frame" x="10" y="0.0" width="394" height="44"/>
2285 <subviews> 2285 <subviews>
2286 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupon_bg" translatesAutoresizingMaskIntoConstraints="NO" id="Gde-3J-Ew9"> 2286 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupon_bg" translatesAutoresizingMaskIntoConstraints="NO" id="Gde-3J-Ew9">
2287 - <rect key="frame" x="0.0" y="0.0" width="394" height="64.5"/> 2287 + <rect key="frame" x="0.0" y="0.0" width="394" height="44"/>
2288 </imageView> 2288 </imageView>
2289 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="87q-5c-uea"> 2289 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="87q-5c-uea">
2290 - <rect key="frame" x="20" y="10" width="79" height="44.5"/> 2290 + <rect key="frame" x="20" y="10" width="79" height="24"/>
2291 <subviews> 2291 <subviews>
2292 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="XsA-Nw-7Pr"> 2292 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="XsA-Nw-7Pr">
2293 - <rect key="frame" x="18" y="18" width="43" height="8.5"/> 2293 + <rect key="frame" x="18" y="18" width="43" height="0.0"/>
2294 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 2294 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
2295 </imageView> 2295 </imageView>
2296 </subviews> 2296 </subviews>
...@@ -2303,7 +2303,7 @@ ...@@ -2303,7 +2303,7 @@
2303 </constraints> 2303 </constraints>
2304 </view> 2304 </view>
2305 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u97-5H-Y40"> 2305 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u97-5H-Y40">
2306 - <rect key="frame" x="104" y="10" width="10" height="44.5"/> 2306 + <rect key="frame" x="104" y="10" width="10" height="24"/>
2307 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 2307 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
2308 <constraints> 2308 <constraints>
2309 <constraint firstAttribute="width" constant="10" id="Tcx-FG-KC0"/> 2309 <constraint firstAttribute="width" constant="10" id="Tcx-FG-KC0"/>
...@@ -2316,13 +2316,13 @@ ...@@ -2316,13 +2316,13 @@
2316 <nil key="highlightedColor"/> 2316 <nil key="highlightedColor"/>
2317 </label> 2317 </label>
2318 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KJD-Db-B4t"> 2318 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KJD-Db-B4t">
2319 - <rect key="frame" x="292.5" y="25" width="81.5" height="15"/> 2319 + <rect key="frame" x="292.5" y="14.5" width="81.5" height="15"/>
2320 <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="12"/> 2320 <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="12"/>
2321 <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> 2321 <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
2322 <nil key="highlightedColor"/> 2322 <nil key="highlightedColor"/>
2323 </label> 2323 </label>
2324 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C5t-xz-oAO"> 2324 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C5t-xz-oAO">
2325 - <rect key="frame" x="119" y="34.5" width="255" height="15"/> 2325 + <rect key="frame" x="119" y="14" width="255" height="15"/>
2326 <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="12"/> 2326 <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="12"/>
2327 <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> 2327 <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
2328 <nil key="highlightedColor"/> 2328 <nil key="highlightedColor"/>
...@@ -2372,7 +2372,7 @@ ...@@ -2372,7 +2372,7 @@
2372 </connections> 2372 </connections>
2373 </tableViewCell> 2373 </tableViewCell>
2374 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletBadgesTableViewCellId" id="TeS-tP-Ilh" customClass="WalletBadgesTableViewCell" customModule="SwiftWarplyFramework"> 2374 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletBadgesTableViewCellId" id="TeS-tP-Ilh" customClass="WalletBadgesTableViewCell" customModule="SwiftWarplyFramework">
2375 - <rect key="frame" x="0.0" y="947.5" width="414" height="260"/> 2375 + <rect key="frame" x="0.0" y="927" width="414" height="260"/>
2376 <autoresizingMask key="autoresizingMask"/> 2376 <autoresizingMask key="autoresizingMask"/>
2377 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TeS-tP-Ilh" id="FFV-uA-HHA"> 2377 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TeS-tP-Ilh" id="FFV-uA-HHA">
2378 <rect key="frame" x="0.0" y="0.0" width="414" height="260"/> 2378 <rect key="frame" x="0.0" y="0.0" width="414" height="260"/>
...@@ -2599,7 +2599,7 @@ ...@@ -2599,7 +2599,7 @@
2599 </connections> 2599 </connections>
2600 </tableViewCell> 2600 </tableViewCell>
2601 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletBannersTableViewCellId" id="fgI-zL-RPZ" customClass="WalletBannersTableViewCell" customModule="SwiftWarplyFramework"> 2601 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletBannersTableViewCellId" id="fgI-zL-RPZ" customClass="WalletBannersTableViewCell" customModule="SwiftWarplyFramework">
2602 - <rect key="frame" x="0.0" y="1207.5" width="414" height="404"/> 2602 + <rect key="frame" x="0.0" y="1187" width="414" height="404"/>
2603 <autoresizingMask key="autoresizingMask"/> 2603 <autoresizingMask key="autoresizingMask"/>
2604 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="fgI-zL-RPZ" id="gNB-PU-R1J"> 2604 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="fgI-zL-RPZ" id="gNB-PU-R1J">
2605 <rect key="frame" x="0.0" y="0.0" width="414" height="404"/> 2605 <rect key="frame" x="0.0" y="0.0" width="414" height="404"/>
...@@ -2967,7 +2967,7 @@ ...@@ -2967,7 +2967,7 @@
2967 </connections> 2967 </connections>
2968 </tableViewCell> 2968 </tableViewCell>
2969 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletActiveCouponsTableViewCellId" id="qaY-Zw-d8E" customClass="WalletActiveCouponsTableViewCell" customModule="SwiftWarplyFramework"> 2969 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletActiveCouponsTableViewCellId" id="qaY-Zw-d8E" customClass="WalletActiveCouponsTableViewCell" customModule="SwiftWarplyFramework">
2970 - <rect key="frame" x="0.0" y="1611.5" width="414" height="98"/> 2970 + <rect key="frame" x="0.0" y="1015" width="414" height="98"/>
2971 <autoresizingMask key="autoresizingMask"/> 2971 <autoresizingMask key="autoresizingMask"/>
2972 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qaY-Zw-d8E" id="MoF-lG-k6u"> 2972 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qaY-Zw-d8E" id="MoF-lG-k6u">
2973 <rect key="frame" x="0.0" y="0.0" width="414" height="98"/> 2973 <rect key="frame" x="0.0" y="0.0" width="414" height="98"/>
...@@ -3250,7 +3250,7 @@ ...@@ -3250,7 +3250,7 @@
3250 </connections> 3250 </connections>
3251 </tableViewCell> 3251 </tableViewCell>
3252 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletVouchersBannerTableViewCellId" id="F1i-u5-1v2" customClass="WalletVouchersBannerTableViewCell" customModule="SwiftWarplyFramework"> 3252 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletVouchersBannerTableViewCellId" id="F1i-u5-1v2" customClass="WalletVouchersBannerTableViewCell" customModule="SwiftWarplyFramework">
3253 - <rect key="frame" x="0.0" y="1709.5" width="414" height="181"/> 3253 + <rect key="frame" x="0.0" y="1689" width="414" height="181"/>
3254 <autoresizingMask key="autoresizingMask"/> 3254 <autoresizingMask key="autoresizingMask"/>
3255 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="F1i-u5-1v2" id="q9T-Eg-Gxw"> 3255 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="F1i-u5-1v2" id="q9T-Eg-Gxw">
3256 <rect key="frame" x="0.0" y="0.0" width="414" height="181"/> 3256 <rect key="frame" x="0.0" y="0.0" width="414" height="181"/>
...@@ -3334,12 +3334,54 @@ ...@@ -3334,12 +3334,54 @@
3334 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 3334 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
3335 <connections> 3335 <connections>
3336 <outlet property="sectionTitleLabel" destination="0yZ-ge-5qY" id="zsT-WW-anR"/> 3336 <outlet property="sectionTitleLabel" destination="0yZ-ge-5qY" id="zsT-WW-anR"/>
3337 + <outlet property="separatorTopSpace" destination="iGG-ot-2k8" id="nZT-4o-Yuq"/>
3338 + <outlet property="separatorView" destination="zKi-zm-jUP" id="Toh-Ph-9np"/>
3337 <outlet property="voucherBannerArrowImage" destination="cSu-mM-1Ep" id="hDY-vI-sfK"/> 3339 <outlet property="voucherBannerArrowImage" destination="cSu-mM-1Ep" id="hDY-vI-sfK"/>
3338 <outlet property="voucherBannerIconImage" destination="U9f-Ar-TCE" id="cy8-jG-sg7"/> 3340 <outlet property="voucherBannerIconImage" destination="U9f-Ar-TCE" id="cy8-jG-sg7"/>
3339 <outlet property="voucherBannerLabel" destination="2p1-v2-lAL" id="Wlm-z2-nrW"/> 3341 <outlet property="voucherBannerLabel" destination="2p1-v2-lAL" id="Wlm-z2-nrW"/>
3340 <outlet property="voucherBannerView" destination="eBr-vb-7oH" id="RU1-Lx-048"/> 3342 <outlet property="voucherBannerView" destination="eBr-vb-7oH" id="RU1-Lx-048"/>
3341 </connections> 3343 </connections>
3342 </tableViewCell> 3344 </tableViewCell>
3345 + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletSpinnerTableViewCellId" id="ShU-xo-DhW" customClass="WalletSpinnerTableViewCell" customModule="SwiftWarplyFramework">
3346 + <rect key="frame" x="0.0" y="1870" width="414" height="98"/>
3347 + <autoresizingMask key="autoresizingMask"/>
3348 + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ShU-xo-DhW" id="U4r-xF-gbA">
3349 + <rect key="frame" x="0.0" y="0.0" width="414" height="98"/>
3350 + <autoresizingMask key="autoresizingMask"/>
3351 + <subviews>
3352 + <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hm4-ma-8T7" userLabel="ParentView">
3353 + <rect key="frame" x="0.0" y="0.0" width="414" height="98"/>
3354 + <subviews>
3355 + <activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" ambiguous="YES" style="large" translatesAutoresizingMaskIntoConstraints="NO" id="Kes-eE-1K8">
3356 + <rect key="frame" x="183" y="30" width="48" height="48"/>
3357 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
3358 + <constraints>
3359 + <constraint firstAttribute="height" constant="48" id="MxX-gd-WB6"/>
3360 + <constraint firstAttribute="width" constant="48" id="kjs-ti-uR8"/>
3361 + </constraints>
3362 + </activityIndicatorView>
3363 + </subviews>
3364 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
3365 + <constraints>
3366 + <constraint firstItem="Kes-eE-1K8" firstAttribute="centerX" secondItem="hm4-ma-8T7" secondAttribute="centerX" id="Zem-vK-XXa"/>
3367 + <constraint firstAttribute="bottom" secondItem="Kes-eE-1K8" secondAttribute="bottom" constant="20" id="dBw-Vl-a7k"/>
3368 + <constraint firstItem="Kes-eE-1K8" firstAttribute="top" secondItem="hm4-ma-8T7" secondAttribute="top" constant="20" id="o0b-VF-Kdo"/>
3369 + </constraints>
3370 + </view>
3371 + </subviews>
3372 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
3373 + <constraints>
3374 + <constraint firstAttribute="bottom" secondItem="hm4-ma-8T7" secondAttribute="bottom" id="8Iu-l7-LLN"/>
3375 + <constraint firstItem="hm4-ma-8T7" firstAttribute="leading" secondItem="U4r-xF-gbA" secondAttribute="leading" id="98d-58-43v"/>
3376 + <constraint firstItem="hm4-ma-8T7" firstAttribute="top" secondItem="U4r-xF-gbA" secondAttribute="top" id="aQR-NQ-sYL"/>
3377 + <constraint firstAttribute="trailing" secondItem="hm4-ma-8T7" secondAttribute="trailing" id="w6m-EM-giU"/>
3378 + </constraints>
3379 + </tableViewCellContentView>
3380 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
3381 + <connections>
3382 + <outlet property="spinner" destination="Kes-eE-1K8" id="SP3-Mn-lgc"/>
3383 + </connections>
3384 + </tableViewCell>
3343 </prototypes> 3385 </prototypes>
3344 <connections> 3386 <connections>
3345 <outlet property="dataSource" destination="pKQ-52-a1r" id="AvY-tV-KMr"/> 3387 <outlet property="dataSource" destination="pKQ-52-a1r" id="AvY-tV-KMr"/>
......
...@@ -8,10 +8,16 @@ ...@@ -8,10 +8,16 @@
8 import UIKit 8 import UIKit
9 9
10 @objc public class WalletSpinnerTableViewCell: UITableViewCell { 10 @objc public class WalletSpinnerTableViewCell: UITableViewCell {
11 - 11 + @IBOutlet weak var spinner: UIActivityIndicatorView!
12 +
12 public override func awakeFromNib() { 13 public override func awakeFromNib() {
13 super.awakeFromNib() 14 super.awakeFromNib()
14 // Initialization code 15 // Initialization code
16 +
17 + spinner.color = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
18 +
19 + spinner.translatesAutoresizingMaskIntoConstraints = false
20 + spinner.startAnimating()
15 } 21 }
16 22
17 public override func setSelected(_ selected: Bool, animated: Bool) { 23 public override func setSelected(_ selected: Bool, animated: Bool) {
...@@ -19,5 +25,12 @@ import UIKit ...@@ -19,5 +25,12 @@ import UIKit
19 25
20 // Configure the view for the selected state 26 // Configure the view for the selected state
21 } 27 }
22 - 28 +
29 + // This is a fix for spinner stopping its animation when reusing cells
30 + public override func prepareForReuse() {
31 + super.prepareForReuse()
32 + if let spinner = self.spinner {
33 + spinner.startAnimating()
34 + }
35 + }
23 } 36 }
......
...@@ -78,6 +78,8 @@ import SwiftEventBus ...@@ -78,6 +78,8 @@ import SwiftEventBus
78 var unifiedCouponsDiscount:Float = 0.0 78 var unifiedCouponsDiscount:Float = 0.0
79 79
80 var forYouExpanded: Bool = false; 80 var forYouExpanded: Bool = false;
81 + var showSpinner: Bool = false;
82 + var showActiveCouponsBanners: Bool = false;
81 83
82 84
83 public override func viewDidLoad() { 85 public override func viewDidLoad() {
...@@ -100,8 +102,10 @@ import SwiftEventBus ...@@ -100,8 +102,10 @@ import SwiftEventBus
100 DispatchQueue.main.async { 102 DispatchQueue.main.async {
101 self.unifiedCoupons = swiftApi().getUnifiedCouponList() 103 self.unifiedCoupons = swiftApi().getUnifiedCouponList()
102 // TODO: Maybe add this 104 // TODO: Maybe add this
103 - self.matchOldSMCoupons() 105 + // TODO: Uncomment if discounts are shown again in wallet
104 - self.updateMarketBadge() 106 +// self.matchOldSMCoupons()
107 +// self.updateMarketBadge()
108 + self.handleSpinnerAndEmptyView()
105 self.tableView.reloadData() 109 self.tableView.reloadData()
106 } 110 }
107 } 111 }
...@@ -111,13 +115,9 @@ import SwiftEventBus ...@@ -111,13 +115,9 @@ import SwiftEventBus
111 DispatchQueue.main.async { 115 DispatchQueue.main.async {
112 print("=== vouchers_fetched event ===") 116 print("=== vouchers_fetched event ===")
113 117
114 - // TODO: hide Spinner 118 + self.handleSpinnerAndEmptyView()
115 - 119 +// self.showSpinner = false
116 - if (swiftApi().getShowVouchersBanner() == "true") { 120 + self.tableView.reloadData()
117 - // TODO: show Vouchers Banner
118 - } else {
119 - // TODO: hide Vouchers Banner
120 - }
121 121
122 } 122 }
123 } 123 }
...@@ -481,21 +481,15 @@ import SwiftEventBus ...@@ -481,21 +481,15 @@ import SwiftEventBus
481 emptyImage.image = UIImage(named: "ic_empty_wallet_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) 481 emptyImage.image = UIImage(named: "ic_empty_wallet_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
482 emptyLabel.text = "Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!" 482 emptyLabel.text = "Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!"
483 483
484 - matchOldSMCoupons() 484 + // TODO: Uncomment if discounts are shown again in wallet
485 - updateMarketBadge() 485 +// matchOldSMCoupons()
486 +// updateMarketBadge()
486 487
487 // TODO: DELETE if emptyView is needed again 488 // TODO: DELETE if emptyView is needed again
488 - emptyView.isHidden = true 489 +// emptyView.isHidden = true
489 - emptyViewHeight.constant = 0 490 +// emptyViewHeight.constant = 0
490 491
491 - if (swiftApi().getShowVouchersBanner() == "") { 492 + self.handleSpinnerAndEmptyView()
492 - // TODO: show Spinner
493 - // TODO: hide Vouchers Banner
494 - } else if (swiftApi().getShowVouchersBanner() == "true") {
495 - // TODO: show Vouchers Banner
496 - } else {
497 - // TODO: hide Vouchers Banner
498 - }
499 493
500 } 494 }
501 495
...@@ -554,7 +548,9 @@ import SwiftEventBus ...@@ -554,7 +548,9 @@ import SwiftEventBus
554 // TODO: Maybe add this 548 // TODO: Maybe add this
555 // self.matchOldSMCoupons() 549 // self.matchOldSMCoupons()
556 // <=== 550 // <===
557 - self.updateMarketBadge() 551 + // TODO: Uncomment if discounts are shown again in wallet
552 +// self.updateMarketBadge()
553 + self.handleSpinnerAndEmptyView()
558 self.tableView.reloadData() 554 self.tableView.reloadData()
559 555
560 self.startTimer() 556 self.startTimer()
...@@ -705,6 +701,40 @@ import SwiftEventBus ...@@ -705,6 +701,40 @@ import SwiftEventBus
705 701
706 } 702 }
707 703
704 + func handleSpinnerAndEmptyView() {
705 + if (swiftApi().getShowVouchersBanner() == "") {
706 + self.showSpinner = true
707 +
708 + if (self.dfyCoupons.count == 0 && self.unifiedCoupons.count == 0 && self.coupons.count == 0) {
709 + self.showSpinner = false
710 + self.showActiveCouponsBanners = false
711 +
712 + self.emptyView.isHidden = false
713 + self.emptyViewHeight.constant = self.emptyView.intrinsicContentSize.height
714 +
715 + } else {
716 + self.emptyView.isHidden = true
717 + self.emptyViewHeight.constant = 0
718 +
719 + self.showActiveCouponsBanners = true
720 + }
721 +
722 + } else {
723 + self.emptyView.isHidden = true
724 + self.emptyViewHeight.constant = 0
725 +
726 + self.showSpinner = false
727 +
728 + if (self.dfyCoupons.count == 0 && self.unifiedCoupons.count == 0 && self.coupons.count == 0) {
729 + self.showActiveCouponsBanners = false
730 +
731 + } else {
732 + self.showActiveCouponsBanners = true
733 + }
734 + }
735 + }
736 +
737 +
708 // MARK: - API Functions 738 // MARK: - API Functions
709 func getCouponsSetsDealsRequest() { 739 func getCouponsSetsDealsRequest() {
710 swiftApi().getCouponSetsDealsAsync(getCouponsSetsDealsCallback, failureCallback: {errorCode in 740 swiftApi().getCouponSetsDealsAsync(getCouponsSetsDealsCallback, failureCallback: {errorCode in
...@@ -734,6 +764,7 @@ import SwiftEventBus ...@@ -734,6 +764,7 @@ import SwiftEventBus
734 DispatchQueue.main.async { 764 DispatchQueue.main.async {
735 self.matchOldSMCoupons() 765 self.matchOldSMCoupons()
736 self.updateMarketBadge() 766 self.updateMarketBadge()
767 + self.handleSpinnerAndEmptyView()
737 self.tableView.reloadData() 768 self.tableView.reloadData()
738 } 769 }
739 } else { 770 } else {
...@@ -957,7 +988,7 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -957,7 +988,7 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
957 988
958 public func numberOfSections(in tableView: UITableView) -> Int { 989 public func numberOfSections(in tableView: UITableView) -> Int {
959 // return 4 990 // return 4
960 - return 2 991 + return 3
961 } 992 }
962 993
963 public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 994 public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
...@@ -994,6 +1025,12 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -994,6 +1025,12 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
994 } else { 1025 } else {
995 return 0 1026 return 0
996 } 1027 }
1028 + } else if (section == 2) {
1029 + if (self.showSpinner == true) {
1030 + return 1
1031 + } else {
1032 + return 0
1033 + }
997 } else { 1034 } else {
998 return 0 1035 return 0
999 } 1036 }
...@@ -1042,6 +1079,12 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -1042,6 +1079,12 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
1042 } else { 1079 } else {
1043 return 0.0 1080 return 0.0
1044 } 1081 }
1082 + } else if (indexPath.section == 2) {
1083 + if (self.showSpinner == true) {
1084 + return UITableView.automaticDimension
1085 + } else {
1086 + return 0.0
1087 + }
1045 } else { 1088 } else {
1046 return 0.0 1089 return 0.0
1047 } 1090 }
...@@ -1141,6 +1184,8 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -1141,6 +1184,8 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
1141 // } else { 1184 // } else {
1142 return nil 1185 return nil
1143 // } 1186 // }
1187 + } else if (section == 2) {
1188 + return nil
1144 } else { 1189 } else {
1145 return nil 1190 return nil
1146 } 1191 }
...@@ -1187,6 +1232,8 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -1187,6 +1232,8 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
1187 // } else { 1232 // } else {
1188 return 0.0 1233 return 0.0
1189 // } 1234 // }
1235 + } else if (section == 2) {
1236 + return 0.0
1190 } else { 1237 } else {
1191 return 0.0 1238 return 0.0
1192 } 1239 }
...@@ -1232,12 +1279,15 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -1232,12 +1279,15 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
1232 cell.configureCell(dfyCount: self.dfyCoupons.count, smCount: self.unifiedCoupons.count, gfyCount: self.coupons.count) 1279 cell.configureCell(dfyCount: self.dfyCoupons.count, smCount: self.unifiedCoupons.count, gfyCount: self.coupons.count)
1233 return cell 1280 return cell
1234 1281
1235 - } else { 1282 + } else if (indexPath.section == 1) {
1236 let cell = tableView.dequeueReusableCell(withIdentifier: "WalletVouchersBannerTableViewCellId", for: indexPath) as! WalletVouchersBannerTableViewCell 1283 let cell = tableView.dequeueReusableCell(withIdentifier: "WalletVouchersBannerTableViewCellId", for: indexPath) as! WalletVouchersBannerTableViewCell
1237 -// cell.configureCell(totalCouponValue: self.totalCouponValue, totalCouponDiscount: self.totalCouponDiscount, unifiedCouponsDiscount: self.unifiedCouponsDiscount, forYouExpanded: self.forYouExpanded) 1284 + cell.configureCell(showSeparator: self.showActiveCouponsBanners)
1285 + return cell
1286 + } else {
1287 + let cell = tableView.dequeueReusableCell(withIdentifier: "WalletSpinnerTableViewCellId", for: indexPath) as! WalletSpinnerTableViewCell
1238 return cell 1288 return cell
1239 } 1289 }
1240 - 1290 +
1241 } 1291 }
1242 1292
1243 public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 1293 public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
...@@ -1292,6 +1342,8 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -1292,6 +1342,8 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
1292 1342
1293 SwiftEventBus.post("vouchers_banner_pressed") 1343 SwiftEventBus.post("vouchers_banner_pressed")
1294 1344
1345 + } else if (indexPath.section == 2) {
1346 + // Do nothing
1295 } else { 1347 } else {
1296 // Do nothing 1348 // Do nothing
1297 } 1349 }
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
8 import UIKit 8 import UIKit
9 9
10 @objc public class WalletVouchersBannerTableViewCell: UITableViewCell { 10 @objc public class WalletVouchersBannerTableViewCell: UITableViewCell {
11 + @IBOutlet weak var separatorView: UIView!
12 + @IBOutlet weak var separatorTopSpace: NSLayoutConstraint!
11 @IBOutlet weak var sectionTitleLabel: UILabel! 13 @IBOutlet weak var sectionTitleLabel: UILabel!
12 @IBOutlet weak var voucherBannerView: UIView! 14 @IBOutlet weak var voucherBannerView: UIView!
13 @IBOutlet weak var voucherBannerIconImage: UIImageView! 15 @IBOutlet weak var voucherBannerIconImage: UIImageView!
...@@ -41,5 +43,16 @@ import UIKit ...@@ -41,5 +43,16 @@ import UIKit
41 43
42 // Configure the view for the selected state 44 // Configure the view for the selected state
43 } 45 }
46 +
47 + func configureCell(showSeparator: Bool) {
48 + if (showSeparator == true) {
49 + separatorView.isHidden = false
50 + separatorTopSpace.constant = 25
51 +
52 + } else {
53 + separatorView.isHidden = true
54 + separatorTopSpace.constant = 0
55 + }
56 + }
44 57
45 } 58 }
......