Manos Chorianopoulos

fix wallet empty spaces v2

......@@ -1238,10 +1238,10 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8YP-uG-vbV">
<rect key="frame" x="20" y="211" width="374" height="452"/>
<rect key="frame" x="20" y="181" width="374" height="0.0"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="aYf-dv-3Ik">
<rect key="frame" x="149.5" y="0.0" width="75" height="75"/>
<rect key="frame" x="149.5" y="30" width="75" height="75"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="75" id="Ppz-og-cjb"/>
......@@ -1249,7 +1249,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SIP-ou-T3X">
<rect key="frame" x="0.0" y="95" width="374" height="16"/>
<rect key="frame" x="0.0" y="125" width="374" height="16"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/>
<color key="textColor" red="1" green="1" blue="1" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -1257,7 +1257,8 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="aYf-dv-3Ik" firstAttribute="top" secondItem="8YP-uG-vbV" secondAttribute="top" id="9v0-Tb-qtX"/>
<constraint firstAttribute="height" id="1ZE-EX-qXg"/>
<constraint firstItem="aYf-dv-3Ik" firstAttribute="top" secondItem="8YP-uG-vbV" secondAttribute="top" constant="30" id="9v0-Tb-qtX"/>
<constraint firstItem="SIP-ou-T3X" firstAttribute="leading" secondItem="8YP-uG-vbV" secondAttribute="leading" id="Adj-64-b2U"/>
<constraint firstItem="aYf-dv-3Ik" firstAttribute="centerX" secondItem="8YP-uG-vbV" secondAttribute="centerX" id="a2J-DK-6lp"/>
<constraint firstItem="SIP-ou-T3X" firstAttribute="top" secondItem="aYf-dv-3Ik" secondAttribute="bottom" constant="20" id="y2l-af-OSc"/>
......@@ -1289,7 +1290,7 @@
<constraint firstAttribute="bottom" secondItem="8YP-uG-vbV" secondAttribute="bottom" id="rKn-W6-URd"/>
<constraint firstItem="Fef-hi-2VL" firstAttribute="leading" secondItem="ICd-s2-mfF" secondAttribute="leading" constant="45" id="t3B-PH-1J8"/>
<constraint firstAttribute="trailing" secondItem="8YP-uG-vbV" secondAttribute="trailing" constant="20" id="tsY-yf-PE4"/>
<constraint firstItem="8YP-uG-vbV" firstAttribute="top" secondItem="Et1-y7-npI" secondAttribute="bottom" constant="30" id="uUj-6O-DHs"/>
<constraint firstItem="8YP-uG-vbV" firstAttribute="top" secondItem="Et1-y7-npI" secondAttribute="bottom" id="uUj-6O-DHs"/>
<constraint firstItem="zFT-By-XHL" firstAttribute="leading" secondItem="ICd-s2-mfF" secondAttribute="leading" constant="10" id="vNb-RY-jSD"/>
<constraint firstItem="Et1-y7-npI" firstAttribute="leading" secondItem="ICd-s2-mfF" secondAttribute="leading" id="vqD-P5-7Vf"/>
<constraint firstItem="Ukv-zL-7sQ" firstAttribute="top" secondItem="Et1-y7-npI" secondAttribute="bottom" id="xRE-8k-dzY"/>
......@@ -1704,6 +1705,7 @@
<outlet property="emptyImage" destination="aYf-dv-3Ik" id="piu-FN-npo"/>
<outlet property="emptyLabel" destination="SIP-ou-T3X" id="ZRk-Xu-Bah"/>
<outlet property="emptyView" destination="8YP-uG-vbV" id="SLO-UB-1ef"/>
<outlet property="emptyViewHeight" destination="1ZE-EX-qXg" id="t7P-pD-h75"/>
<outlet property="headerImage" destination="wP5-YG-vSP" id="MFN-m3-6ou"/>
<outlet property="marketBadgeImage" destination="EZL-9s-XvQ" id="2Ix-Cl-vz1"/>
<outlet property="marketBadgeLabel" destination="rid-Wp-gA9" id="1HK-Mw-for"/>
......
......@@ -38,6 +38,7 @@ import SwiftEventBus
@IBOutlet weak var activeCodeImage: UIImageView!
@IBOutlet weak var myPresentsLabel: UILabel!
@IBOutlet weak var emptyView: UIView!
@IBOutlet weak var emptyViewHeight: NSLayoutConstraint!
@IBOutlet weak var emptyImage: UIImageView!
@IBOutlet weak var emptyLabel: UILabel!
@IBOutlet weak var activeCodeScrollView: UIScrollView!
......@@ -444,8 +445,10 @@ import SwiftEventBus
// if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0) {
if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0 && unifiedCoupons.count == 0) {
emptyView.isHidden = false
emptyViewHeight.constant = rewardsView.intrinsicContentSize.height
} else {
emptyView.isHidden = true
emptyViewHeight.constant = 0
}
}
......