Showing
13 changed files
with
248 additions
and
33 deletions
No preview for this file type
... | @@ -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> | ... | ... |
... | @@ -10,6 +10,7 @@ | ... | @@ -10,6 +10,7 @@ |
10 | 1E2966EA2837A21D00F83FAC /* RSBarcodes_Swift in Frameworks */ = {isa = PBXBuildFile; productRef = 1E2966E92837A21D00F83FAC /* RSBarcodes_Swift */; }; | 10 | 1E2966EA2837A21D00F83FAC /* RSBarcodes_Swift in Frameworks */ = {isa = PBXBuildFile; productRef = 1E2966E92837A21D00F83FAC /* RSBarcodes_Swift */; }; |
11 | 1E74838D28378AF40042A589 /* CouponBarcodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */; }; | 11 | 1E74838D28378AF40042A589 /* CouponBarcodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */; }; |
12 | 1EA1AF0A2835346A008998AA /* CouponsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */; }; | 12 | 1EA1AF0A2835346A008998AA /* CouponsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */; }; |
13 | + 1EA2BB792865BFE8003F2AB0 /* InboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */; }; | ||
13 | 1EB5F4C828536FD60016F36E /* StepsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C728536FD60016F36E /* StepsViewController.swift */; }; | 14 | 1EB5F4C828536FD60016F36E /* StepsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C728536FD60016F36E /* StepsViewController.swift */; }; |
14 | 1EB5F4CA285370C90016F36E /* LoyaltyAnalysisViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */; }; | 15 | 1EB5F4CA285370C90016F36E /* LoyaltyAnalysisViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */; }; |
15 | 1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */ = {isa = PBXBuildFile; productRef = 1EBF5F062840E13F00B8B17F /* SwiftEventBus */; }; | 16 | 1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */ = {isa = PBXBuildFile; productRef = 1EBF5F062840E13F00B8B17F /* SwiftEventBus */; }; |
... | @@ -145,6 +146,7 @@ | ... | @@ -145,6 +146,7 @@ |
145 | /* Begin PBXFileReference section */ | 146 | /* Begin PBXFileReference section */ |
146 | 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponBarcodeViewController.swift; sourceTree = "<group>"; }; | 147 | 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponBarcodeViewController.swift; sourceTree = "<group>"; }; |
147 | 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponsTableViewCell.swift; sourceTree = "<group>"; }; | 148 | 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponsTableViewCell.swift; sourceTree = "<group>"; }; |
149 | + 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxTableViewCell.swift; sourceTree = "<group>"; }; | ||
148 | 1EB5F4C728536FD60016F36E /* StepsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsViewController.swift; sourceTree = "<group>"; }; | 150 | 1EB5F4C728536FD60016F36E /* StepsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsViewController.swift; sourceTree = "<group>"; }; |
149 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyAnalysisViewController.swift; sourceTree = "<group>"; }; | 151 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyAnalysisViewController.swift; sourceTree = "<group>"; }; |
150 | A9B7BE01A4E812DE49866EF8 /* Pods-SwiftWarplyFramework.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWarplyFramework.debug.xcconfig"; path = "Target Support Files/Pods-SwiftWarplyFramework/Pods-SwiftWarplyFramework.debug.xcconfig"; sourceTree = "<group>"; }; | 152 | A9B7BE01A4E812DE49866EF8 /* Pods-SwiftWarplyFramework.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWarplyFramework.debug.xcconfig"; path = "Target Support Files/Pods-SwiftWarplyFramework/Pods-SwiftWarplyFramework.debug.xcconfig"; sourceTree = "<group>"; }; |
... | @@ -337,6 +339,7 @@ | ... | @@ -337,6 +339,7 @@ |
337 | 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */, | 339 | 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */, |
338 | E6A77863282933E50045BBA8 /* DetailsViewController.swift */, | 340 | E6A77863282933E50045BBA8 /* DetailsViewController.swift */, |
339 | E6A778DE282933E60045BBA8 /* GiftsViewController.swift */, | 341 | E6A778DE282933E60045BBA8 /* GiftsViewController.swift */, |
342 | + 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */, | ||
340 | E6A778DB282933E60045BBA8 /* MFYViewController.swift */, | 343 | E6A778DB282933E60045BBA8 /* MFYViewController.swift */, |
341 | E6A7785F282933E40045BBA8 /* WalletViewController.swift */, | 344 | E6A7785F282933E40045BBA8 /* WalletViewController.swift */, |
342 | E6A77A31282BA9C60045BBA8 /* CampaignViewController.swift */, | 345 | E6A77A31282BA9C60045BBA8 /* CampaignViewController.swift */, |
... | @@ -779,6 +782,7 @@ | ... | @@ -779,6 +782,7 @@ |
779 | 1EA1AF0A2835346A008998AA /* CouponsTableViewCell.swift in Sources */, | 782 | 1EA1AF0A2835346A008998AA /* CouponsTableViewCell.swift in Sources */, |
780 | E6A77A32282BA9C60045BBA8 /* CampaignViewController.swift in Sources */, | 783 | E6A77A32282BA9C60045BBA8 /* CampaignViewController.swift in Sources */, |
781 | E6A77917282933E60045BBA8 /* UIViewController+WLAdditions.m in Sources */, | 784 | E6A77917282933E60045BBA8 /* UIViewController+WLAdditions.m in Sources */, |
785 | + 1EA2BB792865BFE8003F2AB0 /* InboxTableViewCell.swift in Sources */, | ||
782 | E6A77943282933E70045BBA8 /* AFNetworkReachabilityManager.m in Sources */, | 786 | E6A77943282933E70045BBA8 /* AFNetworkReachabilityManager.m in Sources */, |
783 | E6A77956282933E70045BBA8 /* GiftsViewController.swift in Sources */, | 787 | E6A77956282933E70045BBA8 /* GiftsViewController.swift in Sources */, |
784 | E6A778F1282933E60045BBA8 /* WLNativeAdTableViewCell.m in Sources */, | 788 | E6A778F1282933E60045BBA8 /* WLNativeAdTableViewCell.m in Sources */, | ... | ... |
... | @@ -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
... | @@ -9,27 +9,86 @@ import Foundation | ... | @@ -9,27 +9,86 @@ import Foundation |
9 | import UIKit | 9 | import UIKit |
10 | 10 | ||
11 | @objc public class GiftsViewController: UIViewController { | 11 | @objc public class GiftsViewController: UIViewController { |
12 | + @IBOutlet weak var mainView: UIView! | ||
13 | + @IBOutlet weak var tableView: UITableView! | ||
12 | 14 | ||
13 | - @IBOutlet weak var campaignButton: UIButton! | 15 | + public var campaigns:Array<swiftApi.CampaignItemModel> = [] |
14 | 16 | ||
15 | - @IBOutlet weak var couponButton: UIButton! | ||
16 | 17 | ||
17 | - public override func viewWillAppear(_ animated: Bool) { | 18 | + public override func viewDidLoad() { |
18 | - super.viewWillAppear(animated) | 19 | + super.viewDidLoad() |
20 | + | ||
21 | + getCampaignsRequest() | ||
22 | + | ||
19 | setBackButton() | 23 | setBackButton() |
20 | - setNavigationTitle("Gifts for You") | 24 | + setNavigationTitle("GIFTS for YOU") |
25 | + | ||
26 | + tableView.delegate = self | ||
27 | + tableView.dataSource = self | ||
28 | + | ||
29 | + tableView.clipsToBounds = true | ||
30 | + tableView.layer.cornerRadius = 30 | ||
31 | + tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | ||
32 | + tableView.contentInset.top = 50 | ||
33 | + | ||
34 | + // Add Top left corner radius | ||
35 | + mainView.clipsToBounds = true | ||
36 | + mainView.layer.cornerRadius = 30 | ||
37 | + mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | ||
38 | + mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00) | ||
39 | + | ||
21 | } | 40 | } |
22 | 41 | ||
23 | - @IBAction func navigateToCampaign(_ sender: Any) { | 42 | + |
24 | - let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 43 | + func getCampaignsRequest() { |
25 | - let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! CampaignViewController | 44 | + swiftApi().getCampaignsAsync(getCampaignsCallback) |
26 | - vc.campaignUrl = "https://www.google.com" | 45 | + } |
27 | - self.navigationController?.pushViewController(vc, animated: true) | 46 | + |
47 | + func getCampaignsCallback (_ campaignsData: Array<swiftApi.CampaignItemModel>?) -> Void { | ||
48 | + if (campaignsData != nil) { | ||
49 | + | ||
50 | + self.campaigns = campaignsData?.filter { $0.offer_category == "gifts_for_you" } ?? [] | ||
51 | + | ||
52 | + DispatchQueue.main.async { | ||
53 | + self.tableView.reloadData() | ||
54 | + swiftApi().setUniqueCampaignList(campaignsData ?? []) | ||
55 | + } | ||
56 | + } else { | ||
57 | + self.campaigns = [] | ||
58 | + } | ||
59 | + } | ||
60 | +} | ||
61 | + | ||
62 | +// MARK: - TableView | ||
63 | +extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ | ||
64 | + | ||
65 | + public func numberOfSections(in tableView: UITableView) -> Int { | ||
66 | + return 1 | ||
67 | + } | ||
68 | + | ||
69 | + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
70 | + return self.campaigns.count | ||
28 | } | 71 | } |
29 | 72 | ||
30 | - @IBAction func navigateToCoupon(_ sender: Any) { | 73 | + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
74 | + return 140.0 + 10.0 | ||
75 | +// return UITableViewAutomaticDimension | ||
76 | + } | ||
77 | + | ||
78 | + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
79 | + let cell = tableView.dequeueReusableCell(withIdentifier: "InboxTableViewCellId", for: indexPath) as! InboxTableViewCell | ||
80 | + | ||
81 | + cell.configureCell(campaign: campaigns[indexPath.row]) | ||
82 | + | ||
83 | + return cell | ||
84 | + } | ||
85 | + | ||
86 | + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
31 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 87 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
32 | - let vc = storyboard.instantiateViewController(withIdentifier: "CouponViewController") as UIViewController | 88 | + let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! CampaignViewController |
89 | + let url = swiftApi().constructCampaignUrl(campaigns[indexPath.row]) | ||
90 | + vc.campaignUrl = url | ||
33 | self.navigationController?.pushViewController(vc, animated: true) | 91 | self.navigationController?.pushViewController(vc, animated: true) |
34 | } | 92 | } |
93 | + | ||
35 | } | 94 | } | ... | ... |
1 | +// | ||
2 | +// InboxTableViewCell.swift | ||
3 | +// SwiftWarplyFramework | ||
4 | +// | ||
5 | +// Created by Manos Chorianopoulos on 24/6/22. | ||
6 | +// | ||
7 | + | ||
8 | +import UIKit | ||
9 | + | ||
10 | +@objc public class InboxTableViewCell: UITableViewCell { | ||
11 | + @IBOutlet weak var inboxView: UIView! | ||
12 | + @IBOutlet weak var campaignImage: UIImageView! | ||
13 | + @IBOutlet weak var newBadgeImage: UIImageView! | ||
14 | + @IBOutlet weak var campaignTitleLabel: UILabel! | ||
15 | + | ||
16 | + public override func awakeFromNib() { | ||
17 | + super.awakeFromNib() | ||
18 | + | ||
19 | + inboxView.layer.cornerRadius = 5.0 | ||
20 | + inboxView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.16).cgColor | ||
21 | + inboxView.layer.shadowOffset = CGSize(width: 0.0, height: 3.0) | ||
22 | + inboxView.layer.shadowOpacity = 1.0 | ||
23 | + inboxView.layer.shadowRadius = 15.0 | ||
24 | + inboxView.clipsToBounds = true | ||
25 | + | ||
26 | + newBadgeImage.image = UIImage(named: "new_icon", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | ||
27 | + | ||
28 | + newBadgeImage.isHidden = true | ||
29 | + } | ||
30 | + | ||
31 | + public override func setSelected(_ selected: Bool, animated: Bool) { | ||
32 | + super.setSelected(selected, animated: animated) | ||
33 | + | ||
34 | + // Configure the view for the selected state | ||
35 | + } | ||
36 | + | ||
37 | + public override func layoutSubviews() { | ||
38 | + super.layoutSubviews() | ||
39 | + //set the values for top,left,bottom,right margins | ||
40 | + let margins = UIEdgeInsets(top: 0, left: 0, bottom: 10, right: 0) | ||
41 | + contentView.frame = contentView.frame.inset(by: margins) | ||
42 | + } | ||
43 | + | ||
44 | + | ||
45 | + func configureCell(campaign: swiftApi.CampaignItemModel) { | ||
46 | + campaignImage.load(link: campaign.logo_url ?? "", placeholder: UIImage(), cache: URLCache()) | ||
47 | + | ||
48 | + campaignTitleLabel.text = campaign.title ?? "" | ||
49 | + | ||
50 | + if (campaign.is_new ?? false) { | ||
51 | + newBadgeImage.isHidden = false | ||
52 | + } | ||
53 | + } | ||
54 | + | ||
55 | +} |
... | @@ -708,35 +708,106 @@ | ... | @@ -708,35 +708,106 @@ |
708 | <scene sceneID="Rnz-IX-el9"> | 708 | <scene sceneID="Rnz-IX-el9"> |
709 | <objects> | 709 | <objects> |
710 | <viewController storyboardIdentifier="GiftsViewController" id="wy8-hC-CyC" customClass="GiftsViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> | 710 | <viewController storyboardIdentifier="GiftsViewController" id="wy8-hC-CyC" customClass="GiftsViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> |
711 | - <view key="view" contentMode="scaleToFill" id="rgt-dj-Aiw"> | 711 | + <view key="view" contentMode="scaleToFill" id="bZT-ov-2Ec"> |
712 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | 712 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
713 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 713 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
714 | <subviews> | 714 | <subviews> |
715 | - <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="th4-Ic-fA6"> | 715 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gxz-nY-dFI" userLabel="Main View"> |
716 | - <rect key="frame" x="144" y="207" width="129" height="31"/> | 716 | + <rect key="frame" x="0.0" y="44" width="414" height="852"/> |
717 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | 717 | + <subviews> |
718 | - <state key="normal" title="Button"/> | 718 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="Obj-Bh-L89"> |
719 | - <buttonConfiguration key="configuration" style="plain" title="Go to Campaign"/> | 719 | + <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> |
720 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
721 | + <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
722 | + <prototypes> | ||
723 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="InboxTableViewCellId" id="5x6-NG-BBQ" customClass="InboxTableViewCell" customModule="swift_example" customModuleProvider="target"> | ||
724 | + <rect key="frame" x="0.0" y="44.5" width="414" height="78"/> | ||
725 | + <autoresizingMask key="autoresizingMask"/> | ||
726 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="5x6-NG-BBQ" id="7Ha-bG-aYy"> | ||
727 | + <rect key="frame" x="0.0" y="0.0" width="414" height="78"/> | ||
728 | + <autoresizingMask key="autoresizingMask"/> | ||
729 | + <subviews> | ||
730 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dwe-Hj-Zch"> | ||
731 | + <rect key="frame" x="20" y="0.0" width="374" height="78"/> | ||
732 | + <subviews> | ||
733 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jxX-dy-R3y"> | ||
734 | + <rect key="frame" x="0.0" y="0.0" width="205.5" height="78"/> | ||
735 | + </imageView> | ||
736 | + <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="DIv-Ip-CVk"> | ||
737 | + <rect key="frame" x="215.5" y="30" width="148.5" height="18"/> | ||
738 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> | ||
739 | + <color key="textColor" red="0.22745098039215686" green="0.32156862745098036" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> | ||
740 | + <nil key="highlightedColor"/> | ||
741 | + </label> | ||
742 | + </subviews> | ||
743 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
744 | + <constraints> | ||
745 | + <constraint firstAttribute="trailing" secondItem="DIv-Ip-CVk" secondAttribute="trailing" constant="10" id="3Ra-7J-3mc"/> | ||
746 | + <constraint firstItem="DIv-Ip-CVk" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Dwe-Hj-Zch" secondAttribute="top" constant="30" id="4gb-ai-Z4U"/> | ||
747 | + <constraint firstItem="jxX-dy-R3y" firstAttribute="top" secondItem="Dwe-Hj-Zch" secondAttribute="top" id="6D5-rD-SvW"/> | ||
748 | + <constraint firstItem="jxX-dy-R3y" firstAttribute="width" secondItem="Dwe-Hj-Zch" secondAttribute="width" multiplier="0.55" id="K81-aj-j4r"/> | ||
749 | + <constraint firstItem="DIv-Ip-CVk" firstAttribute="centerY" secondItem="Dwe-Hj-Zch" secondAttribute="centerY" id="QEv-hk-GVr"/> | ||
750 | + <constraint firstItem="jxX-dy-R3y" firstAttribute="leading" secondItem="Dwe-Hj-Zch" secondAttribute="leading" id="RHe-qO-Hwg"/> | ||
751 | + <constraint firstAttribute="bottom" secondItem="jxX-dy-R3y" secondAttribute="bottom" id="Ycw-mz-744"/> | ||
752 | + <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="DIv-Ip-CVk" secondAttribute="bottom" constant="10" id="kK3-nP-Frz"/> | ||
753 | + <constraint firstItem="DIv-Ip-CVk" firstAttribute="leading" secondItem="jxX-dy-R3y" secondAttribute="trailing" constant="10" id="qGm-0y-8bE"/> | ||
754 | + </constraints> | ||
755 | + </view> | ||
756 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="new_icon" translatesAutoresizingMaskIntoConstraints="NO" id="aDf-3m-BKi"> | ||
757 | + <rect key="frame" x="344" y="5" width="60" height="25"/> | ||
758 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
759 | + <constraints> | ||
760 | + <constraint firstAttribute="width" constant="60" id="5bq-j3-TCg"/> | ||
761 | + <constraint firstAttribute="height" constant="25" id="UUf-Oq-uje"/> | ||
762 | + </constraints> | ||
763 | + </imageView> | ||
764 | + </subviews> | ||
765 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
766 | + <constraints> | ||
767 | + <constraint firstItem="Dwe-Hj-Zch" firstAttribute="leading" secondItem="7Ha-bG-aYy" secondAttribute="leading" constant="20" id="8zR-mB-P7r"/> | ||
768 | + <constraint firstAttribute="trailing" secondItem="Dwe-Hj-Zch" secondAttribute="trailing" constant="20" id="D4E-bL-z1v"/> | ||
769 | + <constraint firstAttribute="trailing" secondItem="aDf-3m-BKi" secondAttribute="trailing" constant="10" id="DgX-6a-x4J"/> | ||
770 | + <constraint firstAttribute="bottom" secondItem="Dwe-Hj-Zch" secondAttribute="bottom" id="YTZ-W0-f3J"/> | ||
771 | + <constraint firstItem="aDf-3m-BKi" firstAttribute="top" secondItem="7Ha-bG-aYy" secondAttribute="top" constant="5" id="faK-LY-2yt"/> | ||
772 | + <constraint firstItem="Dwe-Hj-Zch" firstAttribute="top" secondItem="7Ha-bG-aYy" secondAttribute="top" id="nZu-aa-PoD"/> | ||
773 | + </constraints> | ||
774 | + </tableViewCellContentView> | ||
775 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
720 | <connections> | 776 | <connections> |
721 | - <action selector="navigateToCampaign:" destination="wy8-hC-CyC" eventType="touchUpInside" id="iyc-W4-thN"/> | 777 | + <outlet property="campaignImage" destination="jxX-dy-R3y" id="Nbj-xj-cuo"/> |
778 | + <outlet property="campaignTitleLabel" destination="DIv-Ip-CVk" id="IRs-SM-c5g"/> | ||
779 | + <outlet property="inboxView" destination="Dwe-Hj-Zch" id="L4s-8d-8xb"/> | ||
780 | + <outlet property="newBadgeImage" destination="aDf-3m-BKi" id="8cY-S2-Q13"/> | ||
722 | </connections> | 781 | </connections> |
723 | - </button> | 782 | + </tableViewCell> |
724 | - <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XdG-16-mhI"> | 783 | + </prototypes> |
725 | - <rect key="frame" x="152" y="343" width="114" height="31"/> | ||
726 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
727 | - <state key="normal" title="Button"/> | ||
728 | - <buttonConfiguration key="configuration" style="plain" title="Go to Coupon"/> | ||
729 | <connections> | 784 | <connections> |
730 | - <action selector="navigateToCoupon:" destination="wy8-hC-CyC" eventType="touchUpInside" id="nC7-rM-ykm"/> | 785 | + <outlet property="dataSource" destination="wy8-hC-CyC" id="X8l-qa-Opx"/> |
786 | + <outlet property="delegate" destination="wy8-hC-CyC" id="mdR-Aj-QGh"/> | ||
731 | </connections> | 787 | </connections> |
732 | - </button> | 788 | + </tableView> |
733 | </subviews> | 789 | </subviews> |
734 | - <viewLayoutGuide key="safeArea" id="8yz-fh-0GA"/> | 790 | + <color key="backgroundColor" red="0.2196078431372549" green="0.32156862745098036" blue="0.40392156862745099" alpha="1" colorSpace="calibratedRGB"/> |
735 | - <color key="backgroundColor" systemColor="systemBackgroundColor"/> | 791 | + <constraints> |
792 | + <constraint firstItem="Obj-Bh-L89" firstAttribute="top" secondItem="gxz-nY-dFI" secondAttribute="top" id="ECw-Zp-2Tr"/> | ||
793 | + <constraint firstAttribute="trailing" secondItem="Obj-Bh-L89" secondAttribute="trailing" id="M3y-23-abb"/> | ||
794 | + <constraint firstAttribute="bottom" secondItem="Obj-Bh-L89" secondAttribute="bottom" id="lop-u2-nwa"/> | ||
795 | + <constraint firstItem="Obj-Bh-L89" firstAttribute="leading" secondItem="gxz-nY-dFI" secondAttribute="leading" id="q6N-T6-U0n"/> | ||
796 | + </constraints> | ||
797 | + </view> | ||
798 | + </subviews> | ||
799 | + <viewLayoutGuide key="safeArea" id="DnC-uL-X1U"/> | ||
800 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
801 | + <constraints> | ||
802 | + <constraint firstItem="gxz-nY-dFI" firstAttribute="leading" secondItem="bZT-ov-2Ec" secondAttribute="leading" id="SQu-vX-EiI"/> | ||
803 | + <constraint firstAttribute="bottom" secondItem="gxz-nY-dFI" secondAttribute="bottom" id="UUU-4I-oNA"/> | ||
804 | + <constraint firstAttribute="trailing" secondItem="gxz-nY-dFI" secondAttribute="trailing" id="fRa-H9-0ha"/> | ||
805 | + <constraint firstItem="gxz-nY-dFI" firstAttribute="top" secondItem="DnC-uL-X1U" secondAttribute="top" id="hTP-dP-8pV"/> | ||
806 | + </constraints> | ||
736 | </view> | 807 | </view> |
737 | <connections> | 808 | <connections> |
738 | - <outlet property="campaignButton" destination="th4-Ic-fA6" id="R8G-8Z-ngK"/> | 809 | + <outlet property="mainView" destination="gxz-nY-dFI" id="nfd-vO-aaA"/> |
739 | - <outlet property="couponButton" destination="XdG-16-mhI" id="tBd-RW-5Se"/> | 810 | + <outlet property="tableView" destination="Obj-Bh-L89" id="5cL-tU-7Lw"/> |
740 | </connections> | 811 | </connections> |
741 | </viewController> | 812 | </viewController> |
742 | <placeholder placeholderIdentifier="IBFirstResponder" id="YLX-2E-CQz" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | 813 | <placeholder placeholderIdentifier="IBFirstResponder" id="YLX-2E-CQz" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> |
... | @@ -1198,6 +1269,7 @@ | ... | @@ -1198,6 +1269,7 @@ |
1198 | <image name="dfy_logo_white" width="1611" height="395"/> | 1269 | <image name="dfy_logo_white" width="1611" height="395"/> |
1199 | <image name="ic_background_circle" width="214" height="134"/> | 1270 | <image name="ic_background_circle" width="214" height="134"/> |
1200 | <image name="ic_down_dark" width="22" height="11.5"/> | 1271 | <image name="ic_down_dark" width="22" height="11.5"/> |
1272 | + <image name="new_icon" width="37" height="17"/> | ||
1201 | <image name="wallet_coupons" width="63" height="73"/> | 1273 | <image name="wallet_coupons" width="63" height="73"/> |
1202 | <image name="wallet_dfy_earn" width="63" height="73"/> | 1274 | <image name="wallet_dfy_earn" width="63" height="73"/> |
1203 | <systemColor name="systemBackgroundColor"> | 1275 | <systemColor name="systemBackgroundColor"> | ... | ... |
1 | +{ | ||
2 | + "images" : [ | ||
3 | + { | ||
4 | + "filename" : "new_icon.png", | ||
5 | + "idiom" : "universal", | ||
6 | + "scale" : "1x" | ||
7 | + }, | ||
8 | + { | ||
9 | + "filename" : "new_icon-1.png", | ||
10 | + "idiom" : "universal", | ||
11 | + "scale" : "2x" | ||
12 | + }, | ||
13 | + { | ||
14 | + "filename" : "new_icon-2.png", | ||
15 | + "idiom" : "universal", | ||
16 | + "scale" : "3x" | ||
17 | + } | ||
18 | + ], | ||
19 | + "info" : { | ||
20 | + "author" : "xcode", | ||
21 | + "version" : 1 | ||
22 | + } | ||
23 | +} |
SwiftWarplyFramework/SwiftWarplyFramework/Media.xcassets/new_icon.imageset/new_icon-1.png
0 → 100644
1.9 KB
SwiftWarplyFramework/SwiftWarplyFramework/Media.xcassets/new_icon.imageset/new_icon-2.png
0 → 100644
1.9 KB
1.9 KB
... | @@ -390,6 +390,7 @@ public class swiftApi { | ... | @@ -390,6 +390,7 @@ public class swiftApi { |
390 | public let subtitle: String? | 390 | public let subtitle: String? |
391 | public let session_uuid: String? | 391 | public let session_uuid: String? |
392 | public let subcategory: String? | 392 | public let subcategory: String? |
393 | + public let is_new: Bool? | ||
393 | 394 | ||
394 | init(dictionary: [String: Any]) { | 395 | init(dictionary: [String: Any]) { |
395 | self.index_url = dictionary["index_url"] as? String? ?? "" | 396 | self.index_url = dictionary["index_url"] as? String? ?? "" |
... | @@ -398,6 +399,7 @@ public class swiftApi { | ... | @@ -398,6 +399,7 @@ public class swiftApi { |
398 | self.title = dictionary["title"] as? String? ?? "" | 399 | self.title = dictionary["title"] as? String? ?? "" |
399 | self.subtitle = dictionary["subtitle"] as? String? ?? "" | 400 | self.subtitle = dictionary["subtitle"] as? String? ?? "" |
400 | self.session_uuid = dictionary["session_uuid"] as? String? ?? "" | 401 | self.session_uuid = dictionary["session_uuid"] as? String? ?? "" |
402 | + self.is_new = dictionary["is_new"] as? Bool? ?? false | ||
401 | 403 | ||
402 | // let extra_fields = dictionary["extra_fields"] as? [String: Any]? ?? ["":""] | 404 | // let extra_fields = dictionary["extra_fields"] as? [String: Any]? ?? ["":""] |
403 | let extra_fields = dictionary["extra_fields"] as AnyObject | 405 | let extra_fields = dictionary["extra_fields"] as AnyObject | ... | ... |
-
Please register or login to post a comment