Showing
5 changed files
with
149 additions
and
7 deletions
... | @@ -26,6 +26,7 @@ | ... | @@ -26,6 +26,7 @@ |
26 | 1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */ = {isa = PBXBuildFile; productRef = 1EBF5F062840E13F00B8B17F /* SwiftEventBus */; }; | 26 | 1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */ = {isa = PBXBuildFile; productRef = 1EBF5F062840E13F00B8B17F /* SwiftEventBus */; }; |
27 | 7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */; }; | 27 | 7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */; }; |
28 | A02F34052882B6E60086465F /* TelcoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A02F34042882B6E60086465F /* TelcoViewController.swift */; }; | 28 | A02F34052882B6E60086465F /* TelcoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A02F34042882B6E60086465F /* TelcoViewController.swift */; }; |
29 | + A030E61128D79FA400788E05 /* AnalysisMoreViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A030E60F28D79FA400788E05 /* AnalysisMoreViewCell.swift */; }; | ||
29 | A04D31DE288FF670000E43B5 /* HistoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A04D31DD288FF670000E43B5 /* HistoryViewController.swift */; }; | 30 | A04D31DE288FF670000E43B5 /* HistoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A04D31DD288FF670000E43B5 /* HistoryViewController.swift */; }; |
30 | A079366E2885D07700064122 /* AnalysisChildViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A079366D2885D07700064122 /* AnalysisChildViewController.swift */; }; | 31 | A079366E2885D07700064122 /* AnalysisChildViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A079366D2885D07700064122 /* AnalysisChildViewController.swift */; }; |
31 | A07936702885D95600064122 /* AnalysisItemViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A079366F2885D95600064122 /* AnalysisItemViewCell.swift */; }; | 32 | A07936702885D95600064122 /* AnalysisItemViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A079366F2885D95600064122 /* AnalysisItemViewCell.swift */; }; |
... | @@ -180,6 +181,7 @@ | ... | @@ -180,6 +181,7 @@ |
180 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyAnalysisViewController.swift; sourceTree = "<group>"; }; | 181 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyAnalysisViewController.swift; sourceTree = "<group>"; }; |
181 | 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MFYInboxTableViewCell.swift; sourceTree = "<group>"; }; | 182 | 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MFYInboxTableViewCell.swift; sourceTree = "<group>"; }; |
182 | A02F34042882B6E60086465F /* TelcoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelcoViewController.swift; sourceTree = "<group>"; }; | 183 | A02F34042882B6E60086465F /* TelcoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelcoViewController.swift; sourceTree = "<group>"; }; |
184 | + A030E60F28D79FA400788E05 /* AnalysisMoreViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalysisMoreViewCell.swift; sourceTree = "<group>"; }; | ||
183 | A04D31DD288FF670000E43B5 /* HistoryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HistoryViewController.swift; sourceTree = "<group>"; }; | 185 | A04D31DD288FF670000E43B5 /* HistoryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HistoryViewController.swift; sourceTree = "<group>"; }; |
184 | A079366D2885D07700064122 /* AnalysisChildViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalysisChildViewController.swift; sourceTree = "<group>"; }; | 186 | A079366D2885D07700064122 /* AnalysisChildViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalysisChildViewController.swift; sourceTree = "<group>"; }; |
185 | A079366F2885D95600064122 /* AnalysisItemViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalysisItemViewCell.swift; sourceTree = "<group>"; }; | 187 | A079366F2885D95600064122 /* AnalysisItemViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalysisItemViewCell.swift; sourceTree = "<group>"; }; |
... | @@ -396,6 +398,7 @@ | ... | @@ -396,6 +398,7 @@ |
396 | A079366F2885D95600064122 /* AnalysisItemViewCell.swift */, | 398 | A079366F2885D95600064122 /* AnalysisItemViewCell.swift */, |
397 | A079367B2885F2F500064122 /* AnalysisHeaderViewCell.swift */, | 399 | A079367B2885F2F500064122 /* AnalysisHeaderViewCell.swift */, |
398 | A079367D2885F60A00064122 /* AnalysisHeaderMessageViewCell.swift */, | 400 | A079367D2885F60A00064122 /* AnalysisHeaderMessageViewCell.swift */, |
401 | + A030E60F28D79FA400788E05 /* AnalysisMoreViewCell.swift */, | ||
399 | ); | 402 | ); |
400 | name = cells; | 403 | name = cells; |
401 | sourceTree = "<group>"; | 404 | sourceTree = "<group>"; |
... | @@ -888,6 +891,7 @@ | ... | @@ -888,6 +891,7 @@ |
888 | A09DBCAE2888BA8100DD50B0 /* SharingHistoryViewController.swift in Sources */, | 891 | A09DBCAE2888BA8100DD50B0 /* SharingHistoryViewController.swift in Sources */, |
889 | E6A778F2282933E60045BBA8 /* WLNativeAdCollectionViewCell.m in Sources */, | 892 | E6A778F2282933E60045BBA8 /* WLNativeAdCollectionViewCell.m in Sources */, |
890 | E6A77904282933E60045BBA8 /* WLEvent.m in Sources */, | 893 | E6A77904282933E60045BBA8 /* WLEvent.m in Sources */, |
894 | + A030E61128D79FA400788E05 /* AnalysisMoreViewCell.swift in Sources */, | ||
891 | E6A77927282933E70045BBA8 /* UIRefreshControl+AFNetworking.m in Sources */, | 895 | E6A77927282933E70045BBA8 /* UIRefreshControl+AFNetworking.m in Sources */, |
892 | E6A77955282933E70045BBA8 /* ViewControllerExtensions.swift in Sources */, | 896 | E6A77955282933E70045BBA8 /* ViewControllerExtensions.swift in Sources */, |
893 | A07936762885E9CC00064122 /* UIColorExtensions.swift in Sources */, | 897 | A07936762885E9CC00064122 /* UIColorExtensions.swift in Sources */, | ... | ... |
1 | +// | ||
2 | +// AnalysisMoreViewCell.swift | ||
3 | +// SwiftWarplyFramework | ||
4 | +// | ||
5 | +// Created by Manos Chorianopoulos on 18/9/22. | ||
6 | +// | ||
7 | + | ||
8 | +import UIKit | ||
9 | + | ||
10 | +class AnalysisMoreViewCell: UITableViewCell { | ||
11 | + | ||
12 | + @IBOutlet weak var titleLabel: UILabel! | ||
13 | + | ||
14 | + // lifecycle | ||
15 | + override func awakeFromNib() { | ||
16 | + super.awakeFromNib() | ||
17 | + | ||
18 | + // title | ||
19 | + titleLabel.textColor = UIColor(rgb: 0x435563) | ||
20 | + titleLabel.text = "Δες Περισσότερα" | ||
21 | + } | ||
22 | +} |
... | @@ -11,6 +11,7 @@ class HistoryViewController: AnalysisChildViewController { | ... | @@ -11,6 +11,7 @@ class HistoryViewController: AnalysisChildViewController { |
11 | 11 | ||
12 | var loading: Bool = false | 12 | var loading: Bool = false |
13 | var items: Array<swiftApi.CouponItemModel> = swiftApi().getOldCouponList() | 13 | var items: Array<swiftApi.CouponItemModel> = swiftApi().getOldCouponList() |
14 | + var showMore = true | ||
14 | 15 | ||
15 | // TODO: remove this when configuring model | 16 | // TODO: remove this when configuring model |
16 | let hasMessage = true | 17 | let hasMessage = true |
... | @@ -63,6 +64,7 @@ class HistoryViewController: AnalysisChildViewController { | ... | @@ -63,6 +64,7 @@ class HistoryViewController: AnalysisChildViewController { |
63 | func responseCallback (_ data: Array<swiftApi.CouponItemModel>?) -> Void { | 64 | func responseCallback (_ data: Array<swiftApi.CouponItemModel>?) -> Void { |
64 | 65 | ||
65 | self.items = data! | 66 | self.items = data! |
67 | + self.showMore = (self.items.count > 3) | ||
66 | showContent() | 68 | showContent() |
67 | DispatchQueue.main.async { | 69 | DispatchQueue.main.async { |
68 | self.tableView.reloadData() | 70 | self.tableView.reloadData() |
... | @@ -81,9 +83,12 @@ class HistoryViewController: AnalysisChildViewController { | ... | @@ -81,9 +83,12 @@ class HistoryViewController: AnalysisChildViewController { |
81 | 83 | ||
82 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | 84 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
83 | if (section == 0) { | 85 | if (section == 0) { |
84 | - return 1; | 86 | + return 1 |
85 | } | 87 | } |
86 | 88 | ||
89 | + if (self.showMore) { | ||
90 | + return 4 | ||
91 | + } | ||
87 | return items.count | 92 | return items.count |
88 | } | 93 | } |
89 | 94 | ||
... | @@ -108,9 +113,25 @@ class HistoryViewController: AnalysisChildViewController { | ... | @@ -108,9 +113,25 @@ class HistoryViewController: AnalysisChildViewController { |
108 | return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderViewCell | 113 | return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderViewCell |
109 | } | 114 | } |
110 | 115 | ||
116 | + if (self.showMore && indexPath.row == 3) { | ||
117 | + let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisMoreViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell | ||
118 | + return cell | ||
119 | + } | ||
120 | + | ||
111 | let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell | 121 | let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell |
112 | cell.configureCell(item: items[indexPath.row]) | 122 | cell.configureCell(item: items[indexPath.row]) |
113 | 123 | ||
114 | return cell | 124 | return cell |
115 | } | 125 | } |
126 | + | ||
127 | + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
128 | + if (indexPath.section == 0) { | ||
129 | + return | ||
130 | + } | ||
131 | + | ||
132 | + if (self.showMore && indexPath.row == 3) { | ||
133 | + self.showMore = false | ||
134 | + self.tableView.reloadData() | ||
135 | + } | ||
136 | + } | ||
116 | } | 137 | } | ... | ... |
... | @@ -522,9 +522,46 @@ | ... | @@ -522,9 +522,46 @@ |
522 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 522 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
523 | <color key="backgroundColor" systemColor="systemBackgroundColor"/> | 523 | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
524 | <prototypes> | 524 | <prototypes> |
525 | - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisItemViewCell" rowHeight="160" id="iNx-Id-iLB" customClass="AnalysisItemViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | 525 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisMoreViewCell" rowHeight="160" id="rpm-JS-xpJ" customClass="AnalysisMoreViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> |
526 | <rect key="frame" x="0.0" y="44.5" width="414" height="160"/> | 526 | <rect key="frame" x="0.0" y="44.5" width="414" height="160"/> |
527 | <autoresizingMask key="autoresizingMask"/> | 527 | <autoresizingMask key="autoresizingMask"/> |
528 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="rpm-JS-xpJ" id="4bk-NG-9CV"> | ||
529 | + <rect key="frame" x="0.0" y="0.0" width="414" height="160"/> | ||
530 | + <autoresizingMask key="autoresizingMask"/> | ||
531 | + <subviews> | ||
532 | + <stackView opaque="NO" contentMode="scaleToFill" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="Ujy-Ns-gSY"> | ||
533 | + <rect key="frame" x="142.5" y="65" width="129" height="30"/> | ||
534 | + <subviews> | ||
535 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Δες Περισσότερα" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jD8-wg-76D"> | ||
536 | + <rect key="frame" x="0.0" y="0.0" width="112" height="30"/> | ||
537 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | ||
538 | + <nil key="textColor"/> | ||
539 | + <nil key="highlightedColor"/> | ||
540 | + </label> | ||
541 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_down_dark" translatesAutoresizingMaskIntoConstraints="NO" id="w3t-uo-L5p"> | ||
542 | + <rect key="frame" x="119" y="0.0" width="10" height="30"/> | ||
543 | + <constraints> | ||
544 | + <constraint firstAttribute="width" constant="10" id="Vle-mG-72l"/> | ||
545 | + </constraints> | ||
546 | + </imageView> | ||
547 | + </subviews> | ||
548 | + <constraints> | ||
549 | + <constraint firstAttribute="height" constant="30" id="pZA-sa-b2o"/> | ||
550 | + </constraints> | ||
551 | + </stackView> | ||
552 | + </subviews> | ||
553 | + <constraints> | ||
554 | + <constraint firstItem="Ujy-Ns-gSY" firstAttribute="centerY" secondItem="4bk-NG-9CV" secondAttribute="centerY" id="tjs-LH-AbK"/> | ||
555 | + <constraint firstItem="Ujy-Ns-gSY" firstAttribute="centerX" secondItem="4bk-NG-9CV" secondAttribute="centerX" id="zOh-rM-dnO"/> | ||
556 | + </constraints> | ||
557 | + </tableViewCellContentView> | ||
558 | + <connections> | ||
559 | + <outlet property="titleLabel" destination="jD8-wg-76D" id="K6c-qT-EMs"/> | ||
560 | + </connections> | ||
561 | + </tableViewCell> | ||
562 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisItemViewCell" rowHeight="160" id="iNx-Id-iLB" customClass="AnalysisItemViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
563 | + <rect key="frame" x="0.0" y="204.5" width="414" height="160"/> | ||
564 | + <autoresizingMask key="autoresizingMask"/> | ||
528 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="iNx-Id-iLB" id="X28-3l-fcy"> | 565 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="iNx-Id-iLB" id="X28-3l-fcy"> |
529 | <rect key="frame" x="0.0" y="0.0" width="414" height="160"/> | 566 | <rect key="frame" x="0.0" y="0.0" width="414" height="160"/> |
530 | <autoresizingMask key="autoresizingMask"/> | 567 | <autoresizingMask key="autoresizingMask"/> |
... | @@ -592,7 +629,7 @@ | ... | @@ -592,7 +629,7 @@ |
592 | </connections> | 629 | </connections> |
593 | </tableViewCell> | 630 | </tableViewCell> |
594 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisHeaderViewCell" rowHeight="280" id="HMC-zK-06F" customClass="AnalysisHeaderViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | 631 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisHeaderViewCell" rowHeight="280" id="HMC-zK-06F" customClass="AnalysisHeaderViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> |
595 | - <rect key="frame" x="0.0" y="204.5" width="414" height="280"/> | 632 | + <rect key="frame" x="0.0" y="364.5" width="414" height="280"/> |
596 | <autoresizingMask key="autoresizingMask"/> | 633 | <autoresizingMask key="autoresizingMask"/> |
597 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="HMC-zK-06F" id="RtV-Li-Dnj"> | 634 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="HMC-zK-06F" id="RtV-Li-Dnj"> |
598 | <rect key="frame" x="0.0" y="0.0" width="414" height="280"/> | 635 | <rect key="frame" x="0.0" y="0.0" width="414" height="280"/> |
... | @@ -639,7 +676,7 @@ | ... | @@ -639,7 +676,7 @@ |
639 | </connections> | 676 | </connections> |
640 | </tableViewCell> | 677 | </tableViewCell> |
641 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisHeaderMessageViewCell" rowHeight="380" id="oPh-jz-GSZ" customClass="AnalysisHeaderMessageViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | 678 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisHeaderMessageViewCell" rowHeight="380" id="oPh-jz-GSZ" customClass="AnalysisHeaderMessageViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> |
642 | - <rect key="frame" x="0.0" y="484.5" width="414" height="380"/> | 679 | + <rect key="frame" x="0.0" y="644.5" width="414" height="380"/> |
643 | <autoresizingMask key="autoresizingMask"/> | 680 | <autoresizingMask key="autoresizingMask"/> |
644 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="oPh-jz-GSZ" id="8oK-tI-pLa"> | 681 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="oPh-jz-GSZ" id="8oK-tI-pLa"> |
645 | <rect key="frame" x="0.0" y="0.0" width="414" height="380"/> | 682 | <rect key="frame" x="0.0" y="0.0" width="414" height="380"/> |
... | @@ -2152,9 +2189,46 @@ | ... | @@ -2152,9 +2189,46 @@ |
2152 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 2189 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
2153 | <color key="backgroundColor" systemColor="systemBackgroundColor"/> | 2190 | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
2154 | <prototypes> | 2191 | <prototypes> |
2155 | - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisItemViewCell" rowHeight="160" id="mwO-Y9-Whd" customClass="AnalysisItemViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | 2192 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisMoreViewCell" rowHeight="160" id="y9v-uo-691" customClass="AnalysisMoreViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> |
2156 | <rect key="frame" x="0.0" y="44.5" width="414" height="160"/> | 2193 | <rect key="frame" x="0.0" y="44.5" width="414" height="160"/> |
2157 | <autoresizingMask key="autoresizingMask"/> | 2194 | <autoresizingMask key="autoresizingMask"/> |
2195 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="y9v-uo-691" id="fs3-oQ-Zcn"> | ||
2196 | + <rect key="frame" x="0.0" y="0.0" width="414" height="160"/> | ||
2197 | + <autoresizingMask key="autoresizingMask"/> | ||
2198 | + <subviews> | ||
2199 | + <stackView opaque="NO" contentMode="scaleToFill" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="0nn-Oo-hdD"> | ||
2200 | + <rect key="frame" x="142.5" y="65" width="129" height="30"/> | ||
2201 | + <subviews> | ||
2202 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Δες Περισσότερα" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cnm-Dr-B1b"> | ||
2203 | + <rect key="frame" x="0.0" y="0.0" width="112" height="30"/> | ||
2204 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | ||
2205 | + <nil key="textColor"/> | ||
2206 | + <nil key="highlightedColor"/> | ||
2207 | + </label> | ||
2208 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_down_dark" translatesAutoresizingMaskIntoConstraints="NO" id="eaQ-bR-n13"> | ||
2209 | + <rect key="frame" x="119" y="0.0" width="10" height="30"/> | ||
2210 | + <constraints> | ||
2211 | + <constraint firstAttribute="width" constant="10" id="ZyY-sN-Rx1"/> | ||
2212 | + </constraints> | ||
2213 | + </imageView> | ||
2214 | + </subviews> | ||
2215 | + <constraints> | ||
2216 | + <constraint firstAttribute="height" constant="30" id="83c-wF-2Vx"/> | ||
2217 | + </constraints> | ||
2218 | + </stackView> | ||
2219 | + </subviews> | ||
2220 | + <constraints> | ||
2221 | + <constraint firstItem="0nn-Oo-hdD" firstAttribute="centerY" secondItem="fs3-oQ-Zcn" secondAttribute="centerY" id="YfN-di-oHM"/> | ||
2222 | + <constraint firstItem="0nn-Oo-hdD" firstAttribute="centerX" secondItem="fs3-oQ-Zcn" secondAttribute="centerX" id="d2b-fG-qxB"/> | ||
2223 | + </constraints> | ||
2224 | + </tableViewCellContentView> | ||
2225 | + <connections> | ||
2226 | + <outlet property="titleLabel" destination="Cnm-Dr-B1b" id="ArG-JS-SA8"/> | ||
2227 | + </connections> | ||
2228 | + </tableViewCell> | ||
2229 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisItemViewCell" rowHeight="160" id="mwO-Y9-Whd" customClass="AnalysisItemViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
2230 | + <rect key="frame" x="0.0" y="204.5" width="414" height="160"/> | ||
2231 | + <autoresizingMask key="autoresizingMask"/> | ||
2158 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="mwO-Y9-Whd" id="4Lb-Ez-2D5"> | 2232 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="mwO-Y9-Whd" id="4Lb-Ez-2D5"> |
2159 | <rect key="frame" x="0.0" y="0.0" width="414" height="160"/> | 2233 | <rect key="frame" x="0.0" y="0.0" width="414" height="160"/> |
2160 | <autoresizingMask key="autoresizingMask"/> | 2234 | <autoresizingMask key="autoresizingMask"/> |
... | @@ -2222,7 +2296,7 @@ | ... | @@ -2222,7 +2296,7 @@ |
2222 | </connections> | 2296 | </connections> |
2223 | </tableViewCell> | 2297 | </tableViewCell> |
2224 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisHeaderViewCell" rowHeight="280" id="TXv-Qw-94X" customClass="AnalysisHeaderViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | 2298 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisHeaderViewCell" rowHeight="280" id="TXv-Qw-94X" customClass="AnalysisHeaderViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> |
2225 | - <rect key="frame" x="0.0" y="204.5" width="414" height="280"/> | 2299 | + <rect key="frame" x="0.0" y="364.5" width="414" height="280"/> |
2226 | <autoresizingMask key="autoresizingMask"/> | 2300 | <autoresizingMask key="autoresizingMask"/> |
2227 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TXv-Qw-94X" id="fmq-OF-USg"> | 2301 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TXv-Qw-94X" id="fmq-OF-USg"> |
2228 | <rect key="frame" x="0.0" y="0.0" width="414" height="280"/> | 2302 | <rect key="frame" x="0.0" y="0.0" width="414" height="280"/> |
... | @@ -2258,7 +2332,7 @@ | ... | @@ -2258,7 +2332,7 @@ |
2258 | </connections> | 2332 | </connections> |
2259 | </tableViewCell> | 2333 | </tableViewCell> |
2260 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisHeaderMessageViewCell" rowHeight="380" id="9cE-DQ-oc7" customClass="AnalysisHeaderMessageViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | 2334 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AnalysisHeaderMessageViewCell" rowHeight="380" id="9cE-DQ-oc7" customClass="AnalysisHeaderMessageViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> |
2261 | - <rect key="frame" x="0.0" y="484.5" width="414" height="380"/> | 2335 | + <rect key="frame" x="0.0" y="644.5" width="414" height="380"/> |
2262 | <autoresizingMask key="autoresizingMask"/> | 2336 | <autoresizingMask key="autoresizingMask"/> |
2263 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="9cE-DQ-oc7" id="Kcf-Zv-eMe"> | 2337 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="9cE-DQ-oc7" id="Kcf-Zv-eMe"> |
2264 | <rect key="frame" x="0.0" y="0.0" width="414" height="380"/> | 2338 | <rect key="frame" x="0.0" y="0.0" width="414" height="380"/> | ... | ... |
... | @@ -11,6 +11,7 @@ class SharingHistoryViewController: AnalysisChildViewController { | ... | @@ -11,6 +11,7 @@ class SharingHistoryViewController: AnalysisChildViewController { |
11 | 11 | ||
12 | var loading: Bool = false | 12 | var loading: Bool = false |
13 | var items: Array<swiftApi.SharingCouponModel> = Array() | 13 | var items: Array<swiftApi.SharingCouponModel> = Array() |
14 | + var showMore = true | ||
14 | 15 | ||
15 | // TODO: remove this when configuring model | 16 | // TODO: remove this when configuring model |
16 | let hasMessage = false | 17 | let hasMessage = false |
... | @@ -61,6 +62,7 @@ class SharingHistoryViewController: AnalysisChildViewController { | ... | @@ -61,6 +62,7 @@ class SharingHistoryViewController: AnalysisChildViewController { |
61 | func responseCallback (_ data: Array<swiftApi.SharingCouponModel>?) -> Void { | 62 | func responseCallback (_ data: Array<swiftApi.SharingCouponModel>?) -> Void { |
62 | 63 | ||
63 | self.items = data! | 64 | self.items = data! |
65 | + self.showMore = (self.items.count > 3) | ||
64 | showContent() | 66 | showContent() |
65 | DispatchQueue.main.async { | 67 | DispatchQueue.main.async { |
66 | self.tableView.reloadData() | 68 | self.tableView.reloadData() |
... | @@ -82,6 +84,9 @@ class SharingHistoryViewController: AnalysisChildViewController { | ... | @@ -82,6 +84,9 @@ class SharingHistoryViewController: AnalysisChildViewController { |
82 | return 1; | 84 | return 1; |
83 | } | 85 | } |
84 | 86 | ||
87 | + if (self.showMore) { | ||
88 | + return 4 | ||
89 | + } | ||
85 | return items.count | 90 | return items.count |
86 | } | 91 | } |
87 | 92 | ||
... | @@ -106,9 +111,25 @@ class SharingHistoryViewController: AnalysisChildViewController { | ... | @@ -106,9 +111,25 @@ class SharingHistoryViewController: AnalysisChildViewController { |
106 | return cell | 111 | return cell |
107 | } | 112 | } |
108 | 113 | ||
114 | + if (self.showMore && indexPath.row == 3) { | ||
115 | + let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisMoreViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell | ||
116 | + return cell | ||
117 | + } | ||
118 | + | ||
109 | let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell | 119 | let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell |
110 | cell.configureCell(item: items[indexPath.row]) | 120 | cell.configureCell(item: items[indexPath.row]) |
111 | 121 | ||
112 | return cell | 122 | return cell |
113 | } | 123 | } |
124 | + | ||
125 | + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
126 | + if (indexPath.section == 0) { | ||
127 | + return | ||
128 | + } | ||
129 | + | ||
130 | + if (self.showMore && indexPath.row == 3) { | ||
131 | + self.showMore = false | ||
132 | + self.tableView.reloadData() | ||
133 | + } | ||
134 | + } | ||
114 | } | 135 | } | ... | ... |
-
Please register or login to post a comment