Manos Chorianopoulos

profile fixes

...@@ -101,6 +101,7 @@ protocol MyRewardsBannerOffersScrollTableViewCellDelegate: AnyObject { ...@@ -101,6 +101,7 @@ protocol MyRewardsBannerOffersScrollTableViewCellDelegate: AnyObject {
101 } 101 }
102 102
103 @objc private func profileButtonTapped() { 103 @objc private func profileButtonTapped() {
104 + // TODO: UNCOMMENT
104 delegate?.didTapProfileButton() 105 delegate?.didTapProfileButton()
105 } 106 }
106 } 107 }
......
...@@ -20,16 +20,16 @@ ...@@ -20,16 +20,16 @@
20 <rect key="frame" x="0.0" y="0.0" width="320" height="161"/> 20 <rect key="frame" x="0.0" y="0.0" width="320" height="161"/>
21 <subviews> 21 <subviews>
22 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mga-ND-qoh"> 22 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mga-ND-qoh">
23 - <rect key="frame" x="24" y="26" width="272" height="49"/> 23 + <rect key="frame" x="24" y="26" width="272" height="14"/>
24 <fontDescription key="fontDescription" type="system" pointSize="17"/> 24 <fontDescription key="fontDescription" type="system" pointSize="17"/>
25 <nil key="textColor"/> 25 <nil key="textColor"/>
26 <nil key="highlightedColor"/> 26 <nil key="highlightedColor"/>
27 </label> 27 </label>
28 <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="Ddn-dN-xH1"> 28 <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="Ddn-dN-xH1">
29 - <rect key="frame" x="0.0" y="118" width="320" height="43"/> 29 + <rect key="frame" x="0.0" y="83" width="320" height="48"/>
30 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 30 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
31 <constraints> 31 <constraints>
32 - <constraint firstAttribute="height" constant="43" id="5nG-1p-kic"/> 32 + <constraint firstAttribute="height" constant="48" id="5nG-1p-kic"/>
33 </constraints> 33 </constraints>
34 <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="5" minimumInteritemSpacing="5" id="tAC-pV-kZ6"> 34 <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="5" minimumInteritemSpacing="5" id="tAC-pV-kZ6">
35 <size key="itemSize" width="128" height="120"/> 35 <size key="itemSize" width="128" height="120"/>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
50 <constraint firstItem="Ddn-dN-xH1" firstAttribute="leading" secondItem="1kR-zd-duR" secondAttribute="leading" id="3IU-v8-7cI"/> 50 <constraint firstItem="Ddn-dN-xH1" firstAttribute="leading" secondItem="1kR-zd-duR" secondAttribute="leading" id="3IU-v8-7cI"/>
51 <constraint firstItem="mga-ND-qoh" firstAttribute="top" secondItem="1kR-zd-duR" secondAttribute="top" constant="26" id="J0I-v0-uwq"/> 51 <constraint firstItem="mga-ND-qoh" firstAttribute="top" secondItem="1kR-zd-duR" secondAttribute="top" constant="26" id="J0I-v0-uwq"/>
52 <constraint firstAttribute="trailing" secondItem="mga-ND-qoh" secondAttribute="trailing" constant="24" id="Ss1-zq-znd"/> 52 <constraint firstAttribute="trailing" secondItem="mga-ND-qoh" secondAttribute="trailing" constant="24" id="Ss1-zq-znd"/>
53 - <constraint firstAttribute="bottom" secondItem="Ddn-dN-xH1" secondAttribute="bottom" id="VdN-By-srg"/> 53 + <constraint firstAttribute="bottom" secondItem="Ddn-dN-xH1" secondAttribute="bottom" constant="30" id="VdN-By-srg"/>
54 <constraint firstAttribute="trailing" secondItem="Ddn-dN-xH1" secondAttribute="trailing" id="W06-Yi-lzm"/> 54 <constraint firstAttribute="trailing" secondItem="Ddn-dN-xH1" secondAttribute="trailing" id="W06-Yi-lzm"/>
55 <constraint firstItem="mga-ND-qoh" firstAttribute="leading" secondItem="1kR-zd-duR" secondAttribute="leading" constant="24" id="sEy-GV-Pjr"/> 55 <constraint firstItem="mga-ND-qoh" firstAttribute="leading" secondItem="1kR-zd-duR" secondAttribute="leading" constant="24" id="sEy-GV-Pjr"/>
56 </constraints> 56 </constraints>
......
...@@ -27,7 +27,7 @@ import UIKit ...@@ -27,7 +27,7 @@ import UIKit
27 parentView.layer.cornerRadius = 8.0 27 parentView.layer.cornerRadius = 8.0
28 parentView.clipsToBounds = true 28 parentView.clipsToBounds = true
29 29
30 - discountView.layer.cornerRadius = 34.0 30 + discountView.layer.cornerRadius = 42.0
31 31
32 } 32 }
33 33
......
...@@ -20,6 +20,7 @@ import UIKit ...@@ -20,6 +20,7 @@ import UIKit
20 if (isSelected) { 20 if (isSelected) {
21 parentView.backgroundColor = UIColor(rgb: 0x000F1E) 21 parentView.backgroundColor = UIColor(rgb: 0x000F1E)
22 parentView.layer.cornerRadius = 4.0 22 parentView.layer.cornerRadius = 4.0
23 + parentView.layer.borderWidth = 0
23 24
24 titleLabel.font = UIFont(name: "PingLCG-Bold", size: 16) 25 titleLabel.font = UIFont(name: "PingLCG-Bold", size: 16)
25 titleLabel.textColor = UIColor(rgb: 0xFFFFFF) 26 titleLabel.textColor = UIColor(rgb: 0xFFFFFF)
...@@ -31,8 +32,9 @@ import UIKit ...@@ -31,8 +32,9 @@ import UIKit
31 parentView.layer.cornerRadius = 4.0 32 parentView.layer.cornerRadius = 4.0
32 33
33 titleLabel.font = UIFont(name: "PingLCG-Bold", size: 16) 34 titleLabel.font = UIFont(name: "PingLCG-Bold", size: 16)
34 - titleLabel.textColor = UIColor(rgb: 0xFFFFFF) 35 + titleLabel.textColor = UIColor(rgb: 0x00111B)
35 } 36 }
37 + parentView.clipsToBounds = true
36 titleLabel.text = data.title 38 titleLabel.text = data.title
37 } 39 }
38 } 40 }
......
...@@ -12,6 +12,7 @@ import UIKit ...@@ -12,6 +12,7 @@ import UIKit
12 @IBOutlet weak var tableView: UITableView! 12 @IBOutlet weak var tableView: UITableView!
13 13
14 // MARK: - Dummy Data 14 // MARK: - Dummy Data
15 + // match - survey - tesla - energy saver
15 let allOffers: [OfferModel] = [ 16 let allOffers: [OfferModel] = [
16 // Banner Offers 17 // Banner Offers
17 OfferModel( 18 OfferModel(
...@@ -20,7 +21,7 @@ import UIKit ...@@ -20,7 +21,7 @@ import UIKit
20 description: "13 Απίθανα ΔΩΡΑ σε περιμένουν!", 21 description: "13 Απίθανα ΔΩΡΑ σε περιμένουν!",
21 discount: "", 22 discount: "",
22 discountType: "contest", 23 discountType: "contest",
23 - bannerImage: "contest_banner_1", 24 + bannerImage: "contest_banner_2",
24 merchantLogo: "contest_logo", 25 merchantLogo: "contest_logo",
25 expirationDate: "30/06/2025", 26 expirationDate: "30/06/2025",
26 color: 0x8A2BE2, 27 color: 0x8A2BE2,
...@@ -32,7 +33,7 @@ import UIKit ...@@ -32,7 +33,7 @@ import UIKit
32 description: "13 Απίθανα ΔΩΡΑ σε περιμένουν!", 33 description: "13 Απίθανα ΔΩΡΑ σε περιμένουν!",
33 discount: "", 34 discount: "",
34 discountType: "contest", 35 discountType: "contest",
35 - bannerImage: "contest_banner_2", 36 + bannerImage: "contest_banner_3",
36 merchantLogo: "contest_logo", 37 merchantLogo: "contest_logo",
37 expirationDate: "30/06/2025", 38 expirationDate: "30/06/2025",
38 color: 0x8A2BE2, 39 color: 0x8A2BE2,
...@@ -56,7 +57,7 @@ import UIKit ...@@ -56,7 +57,7 @@ import UIKit
56 description: "13 Απίθανα ΔΩΡΑ σε περιμένουν!", 57 description: "13 Απίθανα ΔΩΡΑ σε περιμένουν!",
57 discount: "", 58 discount: "",
58 discountType: "contest", 59 discountType: "contest",
59 - bannerImage: "contest_banner_3", 60 + bannerImage: "contest_banner_1",
60 merchantLogo: "contest_logo", 61 merchantLogo: "contest_logo",
61 expirationDate: "30/06/2025", 62 expirationDate: "30/06/2025",
62 color: 0x8A2BE2, 63 color: 0x8A2BE2,
...@@ -271,11 +272,12 @@ import UIKit ...@@ -271,11 +272,12 @@ import UIKit
271 ) 272 )
272 ] 273 ]
273 274
275 + // match - survey - tesla - energy saver
274 let contestUrls: [String] = [ 276 let contestUrls: [String] = [
275 - "https://warply.s3.amazonaws.com/dei/campaigns/EnergySaverContest_dev/index.html",
276 "https://warply.s3.amazonaws.com/dei/campaigns/match_dev/index.html", 277 "https://warply.s3.amazonaws.com/dei/campaigns/match_dev/index.html",
278 + "https://warply.s3.amazonaws.com/dei/campaigns/questionnaire_dev/index.html"
277 "https://warply.s3.amazonaws.com/dei/campaigns/tesla_dev/index.html", 279 "https://warply.s3.amazonaws.com/dei/campaigns/tesla_dev/index.html",
278 - "https://warply.s3.amazonaws.com/dei/campaigns/questionnaire_dev" 280 + "https://warply.s3.amazonaws.com/dei/campaigns/EnergySaverContest_dev/index.html",
279 ] 281 ]
280 282
281 var bannerOffersSection: SectionModel? 283 var bannerOffersSection: SectionModel?
......
...@@ -274,11 +274,24 @@ extension ProfileViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -274,11 +274,24 @@ extension ProfileViewController: UITableViewDelegate, UITableViewDataSource {
274 } 274 }
275 275
276 public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { 276 public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
277 +// return nil
278 + if (section <= 3) {
277 return nil 279 return nil
280 + } else {
281 + // Return clear view for spacing
282 + let headerView = UIView()
283 + headerView.backgroundColor = UIColor.white
284 + return headerView
285 + }
278 } 286 }
279 287
280 public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { 288 public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
289 +// return 0.0
290 + if (section <= 3) {
281 return 0.0 291 return 0.0
292 + } else {
293 + return 19.0
294 + }
282 } 295 }
283 296
284 public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { 297 public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
......