Showing
6 changed files
with
28 additions
and
9 deletions
... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
7 | <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> | 7 | <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> |
8 | <dict> | 8 | <dict> |
9 | <key>orderHint</key> | 9 | <key>orderHint</key> |
10 | - <integer>0</integer> | 10 | + <integer>1</integer> |
11 | </dict> | 11 | </dict> |
12 | </dict> | 12 | </dict> |
13 | </dict> | 13 | </dict> | ... | ... |
... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
7 | <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> | 7 | <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> |
8 | <dict> | 8 | <dict> |
9 | <key>orderHint</key> | 9 | <key>orderHint</key> |
10 | - <integer>1</integer> | 10 | + <integer>0</integer> |
11 | </dict> | 11 | </dict> |
12 | </dict> | 12 | </dict> |
13 | </dict> | 13 | </dict> | ... | ... |
No preview for this file type
... | @@ -12,6 +12,7 @@ class AnalysisHeaderViewCell: UITableViewCell { | ... | @@ -12,6 +12,7 @@ class AnalysisHeaderViewCell: UITableViewCell { |
12 | // attributes | 12 | // attributes |
13 | @IBOutlet weak var itemImage: UIImageView! | 13 | @IBOutlet weak var itemImage: UIImageView! |
14 | @IBOutlet weak var titleLabel: UILabel! | 14 | @IBOutlet weak var titleLabel: UILabel! |
15 | + @IBOutlet weak var emptyLabel: UILabel! | ||
15 | 16 | ||
16 | // lifecycle | 17 | // lifecycle |
17 | override func awakeFromNib() { | 18 | override func awakeFromNib() { |
... | @@ -27,8 +28,13 @@ class AnalysisHeaderViewCell: UITableViewCell { | ... | @@ -27,8 +28,13 @@ class AnalysisHeaderViewCell: UITableViewCell { |
27 | } | 28 | } |
28 | 29 | ||
29 | extension AnalysisHeaderViewCell { | 30 | extension AnalysisHeaderViewCell { |
30 | - func configureCell(item: AnalysisItem) { | 31 | + func configureCell(isEmpty: Bool) { |
32 | + | ||
33 | + if (isEmpty == true) { | ||
34 | + emptyLabel.isHidden = false | ||
35 | + } else { | ||
36 | + emptyLabel.isHidden = true | ||
37 | + } | ||
31 | 38 | ||
32 | - // TODO: TO BE IMPLEMENTED | ||
33 | } | 39 | } |
34 | } | 40 | } | ... | ... |
... | @@ -599,14 +599,14 @@ | ... | @@ -599,14 +599,14 @@ |
599 | <autoresizingMask key="autoresizingMask"/> | 599 | <autoresizingMask key="autoresizingMask"/> |
600 | <subviews> | 600 | <subviews> |
601 | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="xmN-ke-oBj"> | 601 | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="xmN-ke-oBj"> |
602 | - <rect key="frame" x="124" y="31" width="166" height="166"/> | 602 | + <rect key="frame" x="124" y="31" width="166" height="137"/> |
603 | <constraints> | 603 | <constraints> |
604 | <constraint firstAttribute="height" constant="166" id="OG9-xL-K4U"/> | 604 | <constraint firstAttribute="height" constant="166" id="OG9-xL-K4U"/> |
605 | <constraint firstAttribute="width" constant="166" id="Xgj-YV-J4n"/> | 605 | <constraint firstAttribute="width" constant="166" id="Xgj-YV-J4n"/> |
606 | </constraints> | 606 | </constraints> |
607 | </imageView> | 607 | </imageView> |
608 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Αναλυτικά:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LKw-8l-mRY"> | 608 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Αναλυτικά:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LKw-8l-mRY"> |
609 | - <rect key="frame" x="169" y="248" width="76" height="22"/> | 609 | + <rect key="frame" x="169" y="218" width="76" height="22"/> |
610 | <constraints> | 610 | <constraints> |
611 | <constraint firstAttribute="height" constant="22" id="T1B-pX-6hx"/> | 611 | <constraint firstAttribute="height" constant="22" id="T1B-pX-6hx"/> |
612 | </constraints> | 612 | </constraints> |
... | @@ -614,15 +614,26 @@ | ... | @@ -614,15 +614,26 @@ |
614 | <nil key="textColor"/> | 614 | <nil key="textColor"/> |
615 | <nil key="highlightedColor"/> | 615 | <nil key="highlightedColor"/> |
616 | </label> | 616 | </label> |
617 | + <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="nTp-Dz-QAc"> | ||
618 | + <rect key="frame" x="20" y="270" width="374" height="0.0"/> | ||
619 | + <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/> | ||
620 | + <color key="textColor" red="0.5450980392" green="0.59215686270000001" blue="0.63921568630000003" alpha="1" colorSpace="calibratedRGB"/> | ||
621 | + <nil key="highlightedColor"/> | ||
622 | + </label> | ||
617 | </subviews> | 623 | </subviews> |
618 | <constraints> | 624 | <constraints> |
625 | + <constraint firstItem="nTp-Dz-QAc" firstAttribute="top" relation="greaterThanOrEqual" secondItem="LKw-8l-mRY" secondAttribute="bottom" constant="30" id="8ah-BK-pt1"/> | ||
626 | + <constraint firstAttribute="bottom" secondItem="nTp-Dz-QAc" secondAttribute="bottom" constant="10" id="9qo-FO-iU2"/> | ||
619 | <constraint firstItem="xmN-ke-oBj" firstAttribute="centerX" secondItem="RtV-Li-Dnj" secondAttribute="centerX" id="LvL-o4-MTE"/> | 627 | <constraint firstItem="xmN-ke-oBj" firstAttribute="centerX" secondItem="RtV-Li-Dnj" secondAttribute="centerX" id="LvL-o4-MTE"/> |
620 | - <constraint firstAttribute="bottom" secondItem="LKw-8l-mRY" secondAttribute="bottom" constant="10" id="jlt-UV-Eud"/> | 628 | + <constraint firstItem="nTp-Dz-QAc" firstAttribute="leading" secondItem="RtV-Li-Dnj" secondAttribute="leading" constant="20" id="fMS-F0-UAU"/> |
629 | + <constraint firstItem="LKw-8l-mRY" firstAttribute="top" secondItem="xmN-ke-oBj" secondAttribute="bottom" constant="50" id="sJz-1y-yRN"/> | ||
630 | + <constraint firstAttribute="trailing" secondItem="nTp-Dz-QAc" secondAttribute="trailing" constant="20" id="tH3-uE-4sM"/> | ||
621 | <constraint firstItem="xmN-ke-oBj" firstAttribute="top" secondItem="RtV-Li-Dnj" secondAttribute="topMargin" constant="20" id="v4Z-tl-gBX"/> | 631 | <constraint firstItem="xmN-ke-oBj" firstAttribute="top" secondItem="RtV-Li-Dnj" secondAttribute="topMargin" constant="20" id="v4Z-tl-gBX"/> |
622 | <constraint firstItem="LKw-8l-mRY" firstAttribute="centerX" secondItem="RtV-Li-Dnj" secondAttribute="centerX" id="yJq-7A-H3r"/> | 632 | <constraint firstItem="LKw-8l-mRY" firstAttribute="centerX" secondItem="RtV-Li-Dnj" secondAttribute="centerX" id="yJq-7A-H3r"/> |
623 | </constraints> | 633 | </constraints> |
624 | </tableViewCellContentView> | 634 | </tableViewCellContentView> |
625 | <connections> | 635 | <connections> |
636 | + <outlet property="emptyLabel" destination="nTp-Dz-QAc" id="euw-Th-h7g"/> | ||
626 | <outlet property="itemImage" destination="xmN-ke-oBj" id="zRs-Ks-2Re"/> | 637 | <outlet property="itemImage" destination="xmN-ke-oBj" id="zRs-Ks-2Re"/> |
627 | <outlet property="titleLabel" destination="LKw-8l-mRY" id="2Nl-uC-2aJ"/> | 638 | <outlet property="titleLabel" destination="LKw-8l-mRY" id="2Nl-uC-2aJ"/> |
628 | </connections> | 639 | </connections> | ... | ... |
... | @@ -87,7 +87,7 @@ class SharingHistoryViewController: AnalysisChildViewController { | ... | @@ -87,7 +87,7 @@ class SharingHistoryViewController: AnalysisChildViewController { |
87 | 87 | ||
88 | override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | 88 | override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
89 | if (indexPath.section == 0) { | 89 | if (indexPath.section == 0) { |
90 | - return hasMessage ? 380.0 : 280 | 90 | + return hasMessage ? 380.0 : (items.count > 0 ? 280 : 380) |
91 | } | 91 | } |
92 | 92 | ||
93 | return 140.0 | 93 | return 140.0 |
... | @@ -101,7 +101,9 @@ class SharingHistoryViewController: AnalysisChildViewController { | ... | @@ -101,7 +101,9 @@ class SharingHistoryViewController: AnalysisChildViewController { |
101 | return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderMessageViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderMessageViewCell | 101 | return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderMessageViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderMessageViewCell |
102 | } | 102 | } |
103 | 103 | ||
104 | - return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderViewCell | 104 | + let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderViewCell |
105 | + cell.configureCell(isEmpty: items.count == 0) | ||
106 | + return cell | ||
105 | } | 107 | } |
106 | 108 | ||
107 | let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell | 109 | let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell | ... | ... |
-
Please register or login to post a comment