Manos Chorianopoulos

favorites ui changes

...@@ -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>1</integer> 10 + <integer>0</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>0</integer> 10 + <integer>1</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -12,6 +12,7 @@ import UIKit ...@@ -12,6 +12,7 @@ import UIKit
12 @IBOutlet weak var allButtonView: UIView! 12 @IBOutlet weak var allButtonView: UIView!
13 @IBOutlet weak var allButtonLabel: UILabel! 13 @IBOutlet weak var allButtonLabel: UILabel!
14 @IBOutlet weak var collectionView: UICollectionView! 14 @IBOutlet weak var collectionView: UICollectionView!
15 + @IBOutlet weak var collectionViewHeightConstraint: NSLayoutConstraint!
15 16
16 var data: SectionModel? 17 var data: SectionModel?
17 18
...@@ -72,6 +73,22 @@ import UIKit ...@@ -72,6 +73,22 @@ import UIKit
72 func configureCell(data: SectionModel?) { 73 func configureCell(data: SectionModel?) {
73 self.data = data 74 self.data = data
74 75
76 + // Update collection view height based on section
77 + if data?.title == "Αγαπημένα" {
78 + collectionViewHeightConstraint.constant = 350 // Match cell height
79 + } else {
80 + collectionViewHeightConstraint.constant = 232 // Default height
81 + }
82 +
83 + // Configure layout based on section type
84 + if let layout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout {
85 + if data?.title == "Αγαπημένα" {
86 + layout.minimumLineSpacing = 24
87 + } else {
88 + layout.minimumLineSpacing = 7
89 + }
90 + }
91 +
75 let catBoldText = (data?.title ?? "") + " " 92 let catBoldText = (data?.title ?? "") + " "
76 let catRegText = "(" + String(data?.count ?? 0) + ")" 93 let catRegText = "(" + String(data?.count ?? 0) + ")"
77 94
...@@ -115,13 +132,20 @@ extension MyRewardsOffersScrollTableViewCell: UICollectionViewDataSource, UICol ...@@ -115,13 +132,20 @@ extension MyRewardsOffersScrollTableViewCell: UICollectionViewDataSource, UICol
115 132
116 // MARK: - UICollectionViewDelegateFlowLayout 133 // MARK: - UICollectionViewDelegateFlowLayout
117 public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { 134 public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
118 -// let screenWidth = UIScreen.main.bounds.width 135 + if self.data?.title == "Αγαπημένα" {
119 - return CGSize(width: 257, height: 232) 136 + return CGSize(width: 275, height: 350)
137 + } else {
138 + return CGSize(width: 257, height: 232)
139 + }
120 } 140 }
121 141
122 // Distance Between Item Cells 142 // Distance Between Item Cells
123 public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { 143 public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
124 - return 7 144 + if self.data?.title == "Αγαπημένα" {
145 + return 24
146 + } else {
147 + return 7
148 + }
125 } 149 }
126 150
127 public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { 151 public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
......
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
12 <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MyRewardsOffersScrollTableViewCell" rowHeight="265" id="KGk-i7-Jjw" customClass="MyRewardsOffersScrollTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> 12 <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MyRewardsOffersScrollTableViewCell" rowHeight="265" id="KGk-i7-Jjw" customClass="MyRewardsOffersScrollTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target">
13 <rect key="frame" x="0.0" y="0.0" width="403" height="265"/> 13 <rect key="frame" x="0.0" y="0.0" width="403" height="265"/>
14 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> 14 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
15 - <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> 15 + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
16 <rect key="frame" x="0.0" y="0.0" width="403" height="265"/> 16 <rect key="frame" x="0.0" y="0.0" width="403" height="265"/>
17 <autoresizingMask key="autoresizingMask"/> 17 <autoresizingMask key="autoresizingMask"/>
18 <subviews> 18 <subviews>
19 - <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3yR-f0-cq6" userLabel="Parent View"> 19 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3yR-f0-cq6" userLabel="Parent View">
20 - <rect key="frame" x="0.0" y="-127" width="403" height="298"/> 20 + <rect key="frame" x="0.0" y="0.0" width="403" height="335"/>
21 <subviews> 21 <subviews>
22 - <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="iQa-jk-pTS" userLabel="Top View"> 22 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iQa-jk-pTS" userLabel="Top View">
23 - <rect key="frame" x="24" y="60" width="355" height="35"/> 23 + <rect key="frame" x="24" y="50" width="355" height="35"/>
24 <subviews> 24 <subviews>
25 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2GN-Th-7DN"> 25 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2GN-Th-7DN">
26 <rect key="frame" x="0.0" y="7" width="270" height="21"/> 26 <rect key="frame" x="0.0" y="7" width="270" height="21"/>
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
69 <constraint firstItem="2GN-Th-7DN" firstAttribute="leading" secondItem="iQa-jk-pTS" secondAttribute="leading" id="j55-YX-1uu"/> 69 <constraint firstItem="2GN-Th-7DN" firstAttribute="leading" secondItem="iQa-jk-pTS" secondAttribute="leading" id="j55-YX-1uu"/>
70 </constraints> 70 </constraints>
71 </view> 71 </view>
72 - <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="E9Q-uB-Uvd"> 72 + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="E9Q-uB-Uvd">
73 - <rect key="frame" x="0.0" y="100" width="403" height="232"/> 73 + <rect key="frame" x="0.0" y="103" width="403" height="232"/>
74 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 74 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
75 <constraints> 75 <constraints>
76 <constraint firstAttribute="height" constant="232" id="kSx-su-PE4"/> 76 <constraint firstAttribute="height" constant="232" id="kSx-su-PE4"/>
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
115 <outlet property="allButtonView" destination="9Qp-M4-KdO" id="dwb-fV-WAm"/> 115 <outlet property="allButtonView" destination="9Qp-M4-KdO" id="dwb-fV-WAm"/>
116 <outlet property="categoryLabel" destination="2GN-Th-7DN" id="wGT-fB-Ktd"/> 116 <outlet property="categoryLabel" destination="2GN-Th-7DN" id="wGT-fB-Ktd"/>
117 <outlet property="collectionView" destination="E9Q-uB-Uvd" id="qi5-nL-UzB"/> 117 <outlet property="collectionView" destination="E9Q-uB-Uvd" id="qi5-nL-UzB"/>
118 + <outlet property="collectionViewHeightConstraint" destination="kSx-su-PE4" id="1To-dW-00H"/>
118 </connections> 119 </connections>
119 <point key="canvasLocation" x="-69.465648854961827" y="-23.591549295774648"/> 120 <point key="canvasLocation" x="-69.465648854961827" y="-23.591549295774648"/>
120 </tableViewCell> 121 </tableViewCell>
......
...@@ -101,7 +101,7 @@ struct OfferModel { ...@@ -101,7 +101,7 @@ struct OfferModel {
101 discountType: "price", 101 discountType: "price",
102 bannerImage: "dominos_banner", 102 bannerImage: "dominos_banner",
103 merchantLogo: "dominos_logo", 103 merchantLogo: "dominos_logo",
104 - expirationDate: "έως 30/09", 104 + expirationDate: "έως 30-09",
105 color: 0xEE417D, 105 color: 0xEE417D,
106 isFavorite: true 106 isFavorite: true
107 ), 107 ),
...@@ -113,7 +113,7 @@ struct OfferModel { ...@@ -113,7 +113,7 @@ struct OfferModel {
113 discountType: "percentage", 113 discountType: "percentage",
114 bannerImage: "dominos_banner", 114 bannerImage: "dominos_banner",
115 merchantLogo: "dominos_logo", 115 merchantLogo: "dominos_logo",
116 - expirationDate: "έως 30/09", 116 + expirationDate: "έως 30-09",
117 color: 0xEE417D, 117 color: 0xEE417D,
118 isFavorite: false 118 isFavorite: false
119 ), 119 ),
...@@ -127,7 +127,7 @@ struct OfferModel { ...@@ -127,7 +127,7 @@ struct OfferModel {
127 // discountType: "percentage", 127 // discountType: "percentage",
128 // bannerImage: "car_rental_banner", 128 // bannerImage: "car_rental_banner",
129 // merchantLogo: "avis_logo", 129 // merchantLogo: "avis_logo",
130 - // expirationDate: "έως 30/09", 130 + // expirationDate: "έως 30-09",
131 // color: 0xEE417D, 131 // color: 0xEE417D,
132 // isFavorite: true 132 // isFavorite: true
133 // ), 133 // ),
...@@ -139,7 +139,7 @@ struct OfferModel { ...@@ -139,7 +139,7 @@ struct OfferModel {
139 // discountType: "amount", 139 // discountType: "amount",
140 // bannerImage: "hotel_banner", 140 // bannerImage: "hotel_banner",
141 // merchantLogo: "booking_logo", 141 // merchantLogo: "booking_logo",
142 - // expirationDate: "έως 30/09", 142 + // expirationDate: "έως 30-09",
143 // color: 0xEE417D, 143 // color: 0xEE417D,
144 // isFavorite: true 144 // isFavorite: true
145 // ), 145 // ),
...@@ -153,7 +153,7 @@ struct OfferModel { ...@@ -153,7 +153,7 @@ struct OfferModel {
153 discountType: "percentage", 153 discountType: "percentage",
154 bannerImage: "musa_banner", 154 bannerImage: "musa_banner",
155 merchantLogo: "musa_logo", 155 merchantLogo: "musa_logo",
156 - expirationDate: "έως 30/09", 156 + expirationDate: "έως 30-09",
157 color: 0x09914E, 157 color: 0x09914E,
158 isFavorite: false 158 isFavorite: false
159 ), 159 ),
...@@ -165,7 +165,7 @@ struct OfferModel { ...@@ -165,7 +165,7 @@ struct OfferModel {
165 discountType: "percentage", 165 discountType: "percentage",
166 bannerImage: "musa_banner", 166 bannerImage: "musa_banner",
167 merchantLogo: "musa_logo", 167 merchantLogo: "musa_logo",
168 - expirationDate: "έως 30/09", 168 + expirationDate: "έως 30-09",
169 color: 0x09914E, 169 color: 0x09914E,
170 isFavorite: true 170 isFavorite: true
171 ), 171 ),
...@@ -179,7 +179,7 @@ struct OfferModel { ...@@ -179,7 +179,7 @@ struct OfferModel {
179 discountType: "percentage", 179 discountType: "percentage",
180 bannerImage: "ranch_banner", 180 bannerImage: "ranch_banner",
181 merchantLogo: "ranch_logo", 181 merchantLogo: "ranch_logo",
182 - expirationDate: "έως 30/09", 182 + expirationDate: "έως 30-09",
183 color: 0xFC9F25, 183 color: 0xFC9F25,
184 isFavorite: false 184 isFavorite: false
185 ), 185 ),
...@@ -191,7 +191,7 @@ struct OfferModel { ...@@ -191,7 +191,7 @@ struct OfferModel {
191 discountType: "buyOneGetOne", 191 discountType: "buyOneGetOne",
192 bannerImage: "ranch_banner", 192 bannerImage: "ranch_banner",
193 merchantLogo: "ranch_logo", 193 merchantLogo: "ranch_logo",
194 - expirationDate: "έως 30/09", 194 + expirationDate: "έως 30-09",
195 color: 0xFC9F25, 195 color: 0xFC9F25,
196 isFavorite: false 196 isFavorite: false
197 ), 197 ),
...@@ -205,7 +205,7 @@ struct OfferModel { ...@@ -205,7 +205,7 @@ struct OfferModel {
205 discountType: "amount", 205 discountType: "amount",
206 bannerImage: "coffeeisland_banner", 206 bannerImage: "coffeeisland_banner",
207 merchantLogo: "coffeeisland_logo", 207 merchantLogo: "coffeeisland_logo",
208 - expirationDate: "έως 30/09", 208 + expirationDate: "έως 30-09",
209 color: 0xEE417D, 209 color: 0xEE417D,
210 isFavorite: false 210 isFavorite: false
211 ), 211 ),
...@@ -217,7 +217,7 @@ struct OfferModel { ...@@ -217,7 +217,7 @@ struct OfferModel {
217 discountType: "percentage", 217 discountType: "percentage",
218 bannerImage: "coffeeisland_banner", 218 bannerImage: "coffeeisland_banner",
219 merchantLogo: "coffeeisland_logo", 219 merchantLogo: "coffeeisland_logo",
220 - expirationDate: "έως 30/09", 220 + expirationDate: "έως 30-09",
221 color: 0xEE417D, 221 color: 0xEE417D,
222 isFavorite: false 222 isFavorite: false
223 ), 223 ),
...@@ -231,7 +231,7 @@ struct OfferModel { ...@@ -231,7 +231,7 @@ struct OfferModel {
231 discountType: "percentage", 231 discountType: "percentage",
232 bannerImage: "ninemia_banner", 232 bannerImage: "ninemia_banner",
233 merchantLogo: "ninemia_logo", 233 merchantLogo: "ninemia_logo",
234 - expirationDate: "έως 30/09", 234 + expirationDate: "έως 30-09",
235 color: 0xEE417D, 235 color: 0xEE417D,
236 isFavorite: true 236 isFavorite: true
237 ), 237 ),
...@@ -243,7 +243,7 @@ struct OfferModel { ...@@ -243,7 +243,7 @@ struct OfferModel {
243 discountType: "percentage", 243 discountType: "percentage",
244 bannerImage: "ninemia_banner", 244 bannerImage: "ninemia_banner",
245 merchantLogo: "ninemia_logo", 245 merchantLogo: "ninemia_logo",
246 - expirationDate: "έως 30/09", 246 + expirationDate: "έως 30-09",
247 color: 0xEE417D, 247 color: 0xEE417D,
248 isFavorite: false 248 isFavorite: false
249 ), 249 ),
...@@ -257,7 +257,7 @@ struct OfferModel { ...@@ -257,7 +257,7 @@ struct OfferModel {
257 discountType: "percentage", 257 discountType: "percentage",
258 bannerImage: "moustakas_banner", 258 bannerImage: "moustakas_banner",
259 merchantLogo: "moustakas_logo", 259 merchantLogo: "moustakas_logo",
260 - expirationDate: "έως 30/09", 260 + expirationDate: "έως 30-09",
261 color: 0xEE417D, 261 color: 0xEE417D,
262 isFavorite: false 262 isFavorite: false
263 ), 263 ),
...@@ -269,7 +269,7 @@ struct OfferModel { ...@@ -269,7 +269,7 @@ struct OfferModel {
269 discountType: "buyOneGetOne", 269 discountType: "buyOneGetOne",
270 bannerImage: "moustakas_banner", 270 bannerImage: "moustakas_banner",
271 merchantLogo: "moustakas_logo", 271 merchantLogo: "moustakas_logo",
272 - expirationDate: "έως 30/09", 272 + expirationDate: "έως 30-09",
273 color: 0xEE417D, 273 color: 0xEE417D,
274 isFavorite: false 274 isFavorite: false
275 ), 275 ),
...@@ -283,7 +283,7 @@ struct OfferModel { ...@@ -283,7 +283,7 @@ struct OfferModel {
283 discountType: "amount", 283 discountType: "amount",
284 bannerImage: "migato_banner", 284 bannerImage: "migato_banner",
285 merchantLogo: "migato_logo", 285 merchantLogo: "migato_logo",
286 - expirationDate: "έως 30/09", 286 + expirationDate: "έως 30-09",
287 color: 0xEE417D, 287 color: 0xEE417D,
288 isFavorite: false 288 isFavorite: false
289 ), 289 ),
...@@ -295,7 +295,7 @@ struct OfferModel { ...@@ -295,7 +295,7 @@ struct OfferModel {
295 discountType: "percentage", 295 discountType: "percentage",
296 bannerImage: "migato_banner", 296 bannerImage: "migato_banner",
297 merchantLogo: "migato_logo", 297 merchantLogo: "migato_logo",
298 - expirationDate: "έως 30/09", 298 + expirationDate: "έως 30-09",
299 color: 0xEE417D, 299 color: 0xEE417D,
300 isFavorite: false 300 isFavorite: false
301 ) 301 )
......