Showing
11 changed files
with
304 additions
and
5 deletions
No preview for this file type
... | @@ -13,6 +13,7 @@ | ... | @@ -13,6 +13,7 @@ |
13 | 1EA2BB792865BFE8003F2AB0 /* InboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */; }; | 13 | 1EA2BB792865BFE8003F2AB0 /* InboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */; }; |
14 | 1EB5F4C828536FD60016F36E /* StepsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C728536FD60016F36E /* StepsViewController.swift */; }; | 14 | 1EB5F4C828536FD60016F36E /* StepsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C728536FD60016F36E /* StepsViewController.swift */; }; |
15 | 1EB5F4CA285370C90016F36E /* LoyaltyAnalysisViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */; }; | 15 | 1EB5F4CA285370C90016F36E /* LoyaltyAnalysisViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */; }; |
16 | + 1EBE97212865EE460080EFF7 /* MFYInboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */; }; | ||
16 | 1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */ = {isa = PBXBuildFile; productRef = 1EBF5F062840E13F00B8B17F /* SwiftEventBus */; }; | 17 | 1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */ = {isa = PBXBuildFile; productRef = 1EBF5F062840E13F00B8B17F /* SwiftEventBus */; }; |
17 | 7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */; }; | 18 | 7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */; }; |
18 | E6A77853282933340045BBA8 /* SwiftWarplyFramework.docc in Sources */ = {isa = PBXBuildFile; fileRef = E6A77852282933340045BBA8 /* SwiftWarplyFramework.docc */; }; | 19 | E6A77853282933340045BBA8 /* SwiftWarplyFramework.docc in Sources */ = {isa = PBXBuildFile; fileRef = E6A77852282933340045BBA8 /* SwiftWarplyFramework.docc */; }; |
... | @@ -149,6 +150,7 @@ | ... | @@ -149,6 +150,7 @@ |
149 | 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxTableViewCell.swift; sourceTree = "<group>"; }; | 150 | 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxTableViewCell.swift; sourceTree = "<group>"; }; |
150 | 1EB5F4C728536FD60016F36E /* StepsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsViewController.swift; sourceTree = "<group>"; }; | 151 | 1EB5F4C728536FD60016F36E /* StepsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsViewController.swift; sourceTree = "<group>"; }; |
151 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyAnalysisViewController.swift; sourceTree = "<group>"; }; | 152 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyAnalysisViewController.swift; sourceTree = "<group>"; }; |
153 | + 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MFYInboxTableViewCell.swift; 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>"; }; | 154 | 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>"; }; |
153 | B9EB8A451EF0C5AD75094EEE /* Pods-SwiftWarplyFramework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWarplyFramework.release.xcconfig"; path = "Target Support Files/Pods-SwiftWarplyFramework/Pods-SwiftWarplyFramework.release.xcconfig"; sourceTree = "<group>"; }; | 155 | B9EB8A451EF0C5AD75094EEE /* Pods-SwiftWarplyFramework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWarplyFramework.release.xcconfig"; path = "Target Support Files/Pods-SwiftWarplyFramework/Pods-SwiftWarplyFramework.release.xcconfig"; sourceTree = "<group>"; }; |
154 | C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftWarplyFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | 156 | C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftWarplyFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
... | @@ -340,6 +342,7 @@ | ... | @@ -340,6 +342,7 @@ |
340 | E6A77863282933E50045BBA8 /* DetailsViewController.swift */, | 342 | E6A77863282933E50045BBA8 /* DetailsViewController.swift */, |
341 | E6A778DE282933E60045BBA8 /* GiftsViewController.swift */, | 343 | E6A778DE282933E60045BBA8 /* GiftsViewController.swift */, |
342 | 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */, | 344 | 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */, |
345 | + 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */, | ||
343 | E6A778DB282933E60045BBA8 /* MFYViewController.swift */, | 346 | E6A778DB282933E60045BBA8 /* MFYViewController.swift */, |
344 | E6A7785F282933E40045BBA8 /* WalletViewController.swift */, | 347 | E6A7785F282933E40045BBA8 /* WalletViewController.swift */, |
345 | E6A77A31282BA9C60045BBA8 /* CampaignViewController.swift */, | 348 | E6A77A31282BA9C60045BBA8 /* CampaignViewController.swift */, |
... | @@ -791,6 +794,7 @@ | ... | @@ -791,6 +794,7 @@ |
791 | E6A778ED282933E60045BBA8 /* WLCustomNativeCollectionViewCell.m in Sources */, | 794 | E6A778ED282933E60045BBA8 /* WLCustomNativeCollectionViewCell.m in Sources */, |
792 | E6A7790D282933E60045BBA8 /* WLLocationManager.m in Sources */, | 795 | E6A7790D282933E60045BBA8 /* WLLocationManager.m in Sources */, |
793 | E6A7793D282933E70045BBA8 /* AFURLResponseSerialization.m in Sources */, | 796 | E6A7793D282933E70045BBA8 /* AFURLResponseSerialization.m in Sources */, |
797 | + 1EBE97212865EE460080EFF7 /* MFYInboxTableViewCell.swift in Sources */, | ||
794 | E6A778FD282933E60045BBA8 /* WLInboxItem.m in Sources */, | 798 | E6A778FD282933E60045BBA8 /* WLInboxItem.m in Sources */, |
795 | E6A778EE282933E60045BBA8 /* WLNativeAdsTableMode.m in Sources */, | 799 | E6A778EE282933E60045BBA8 /* WLNativeAdsTableMode.m in Sources */, |
796 | E6A778DF282933E60045BBA8 /* WarplyReactMethods.m in Sources */, | 800 | E6A778DF282933E60045BBA8 /* WarplyReactMethods.m in Sources */, | ... | ... |
No preview for this file type
1 | +// | ||
2 | +// MFYInboxTableViewCell.swift | ||
3 | +// SwiftWarplyFramework | ||
4 | +// | ||
5 | +// Created by Manos Chorianopoulos on 24/6/22. | ||
6 | +// | ||
7 | + | ||
8 | +import UIKit | ||
9 | + | ||
10 | +@objc public class MFYInboxTableViewCell: 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 | + @IBOutlet weak var curvedBgImage: UIImageView! | ||
16 | + @IBOutlet weak var subtitleLabel: UILabel! | ||
17 | + @IBOutlet weak var descriptionLabel: UILabel! | ||
18 | + | ||
19 | + public override func awakeFromNib() { | ||
20 | + super.awakeFromNib() | ||
21 | + | ||
22 | + inboxView.layer.cornerRadius = 5.0 | ||
23 | + inboxView.clipsToBounds = true | ||
24 | + | ||
25 | + newBadgeImage.image = UIImage(named: "new_icon", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | ||
26 | + curvedBgImage.image = UIImage(named: "curved_bg_white", 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 | + subtitleLabel.text = campaign.subtitle ?? "" | ||
50 | + descriptionLabel.text = campaign.message ?? "" | ||
51 | + | ||
52 | + if (campaign.is_new ?? false) { | ||
53 | + newBadgeImage.isHidden = false | ||
54 | + } | ||
55 | + } | ||
56 | + | ||
57 | +} |
... | @@ -9,9 +9,87 @@ import Foundation | ... | @@ -9,9 +9,87 @@ import Foundation |
9 | import UIKit | 9 | import UIKit |
10 | 10 | ||
11 | @objc public class MFYViewController: UIViewController { | 11 | @objc public class MFYViewController: UIViewController { |
12 | - public override func viewWillAppear(_ animated: Bool) { | 12 | + @IBOutlet weak var mainView: UIView! |
13 | - super.viewWillAppear(animated) | 13 | + @IBOutlet weak var tableView: UITableView! |
14 | + | ||
15 | + public var campaigns:Array<swiftApi.CampaignItemModel> = [] | ||
16 | + | ||
17 | + | ||
18 | + public override func viewDidLoad() { | ||
19 | + super.viewDidLoad() | ||
20 | + | ||
21 | + getCampaignsRequest() | ||
22 | + | ||
14 | setBackButton() | 23 | setBackButton() |
15 | - setNavigationTitle("More for you") | 24 | + setNavigationTitle("MORE 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 | + | ||
40 | + } | ||
41 | + | ||
42 | + | ||
43 | + func getCampaignsRequest() { | ||
44 | + swiftApi().getCampaignsAsync(getCampaignsCallback) | ||
45 | + } | ||
46 | + | ||
47 | + func getCampaignsCallback (_ campaignsData: Array<swiftApi.CampaignItemModel>?) -> Void { | ||
48 | + if (campaignsData != nil) { | ||
49 | + | ||
50 | + self.campaigns = campaignsData?.filter { $0.offer_category == "more_for_you" } ?? [] | ||
51 | + | ||
52 | + DispatchQueue.main.async { | ||
53 | + self.tableView.reloadData() | ||
54 | + swiftApi().setUniqueCampaignList(campaignsData ?? []) | ||
55 | + } | ||
56 | + } else { | ||
57 | + self.campaigns = [] | ||
16 | } | 58 | } |
59 | + } | ||
60 | +} | ||
61 | + | ||
62 | +// MARK: - TableView | ||
63 | +extension MFYViewController: 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 | ||
71 | + } | ||
72 | + | ||
73 | + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
74 | + return 220.0 + 10.0 | ||
75 | +// return UITableViewAutomaticDimension | ||
76 | + } | ||
77 | + | ||
78 | + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
79 | + let cell = tableView.dequeueReusableCell(withIdentifier: "MFYInboxTableViewCellId", for: indexPath) as! MFYInboxTableViewCell | ||
80 | + | ||
81 | + cell.configureCell(campaign: campaigns[indexPath.row]) | ||
82 | + | ||
83 | + return cell | ||
84 | + } | ||
85 | + | ||
86 | + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
87 | + | ||
88 | + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | ||
89 | + let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! CampaignViewController | ||
90 | + let url = swiftApi().constructCampaignUrl(campaigns[indexPath.row]) | ||
91 | + vc.campaignUrl = url | ||
92 | + self.navigationController?.pushViewController(vc, animated: true) | ||
93 | + } | ||
94 | + | ||
17 | } | 95 | } | ... | ... |
... | @@ -190,12 +190,146 @@ | ... | @@ -190,12 +190,146 @@ |
190 | <scene sceneID="g5j-BC-VRb"> | 190 | <scene sceneID="g5j-BC-VRb"> |
191 | <objects> | 191 | <objects> |
192 | <viewController storyboardIdentifier="MFYViewController" id="YRk-Az-LOb" customClass="MFYViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> | 192 | <viewController storyboardIdentifier="MFYViewController" id="YRk-Az-LOb" customClass="MFYViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> |
193 | - <view key="view" contentMode="scaleToFill" id="iEB-He-DJV"> | 193 | + <view key="view" contentMode="scaleToFill" id="TGQ-35-pS2"> |
194 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | 194 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
195 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 195 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
196 | - <viewLayoutGuide key="safeArea" id="eXr-I0-rkv"/> | 196 | + <subviews> |
197 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NSn-MS-EVn" userLabel="Main View"> | ||
198 | + <rect key="frame" x="0.0" y="44" width="414" height="852"/> | ||
199 | + <subviews> | ||
200 | + <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="A8b-3b-5xc"> | ||
201 | + <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> | ||
202 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
203 | + <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
204 | + <prototypes> | ||
205 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="MFYInboxTableViewCellId" id="TRe-Ck-sF8" customClass="MFYInboxTableViewCell" customModule="swift_example" customModuleProvider="target"> | ||
206 | + <rect key="frame" x="0.0" y="44.5" width="414" height="118.5"/> | ||
207 | + <autoresizingMask key="autoresizingMask"/> | ||
208 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TRe-Ck-sF8" id="1NS-DA-C6q"> | ||
209 | + <rect key="frame" x="0.0" y="0.0" width="414" height="118.5"/> | ||
210 | + <autoresizingMask key="autoresizingMask"/> | ||
211 | + <subviews> | ||
212 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gk0-7d-Ok4"> | ||
213 | + <rect key="frame" x="20" y="0.0" width="374" height="118.5"/> | ||
214 | + <subviews> | ||
215 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rO0-9o-lPR"> | ||
216 | + <rect key="frame" x="0.0" y="0.0" width="374" height="118.5"/> | ||
217 | + </imageView> | ||
218 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wwZ-Gb-7yh" userLabel="InfoView"> | ||
219 | + <rect key="frame" x="0.0" y="0.0" width="299" height="118.5"/> | ||
220 | + <subviews> | ||
221 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="curved_bg_white" translatesAutoresizingMaskIntoConstraints="NO" id="VSX-eK-ySx"> | ||
222 | + <rect key="frame" x="0.0" y="0.0" width="299" height="118.5"/> | ||
223 | + </imageView> | ||
224 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZGH-0a-Rkp"> | ||
225 | + <rect key="frame" x="20" y="10" width="229" height="20.5"/> | ||
226 | + <fontDescription key="fontDescription" type="system" weight="heavy" pointSize="17"/> | ||
227 | + <color key="textColor" red="0.22745098039215686" green="0.32156862745098036" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> | ||
228 | + <nil key="highlightedColor"/> | ||
229 | + </label> | ||
230 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lIv-wc-Oa8"> | ||
231 | + <rect key="frame" x="20" y="35.5" width="229" height="18"/> | ||
232 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> | ||
233 | + <color key="textColor" red="0.22745098039215686" green="0.32156862745098036" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> | ||
234 | + <nil key="highlightedColor"/> | ||
235 | + </label> | ||
236 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bmR-su-WJq"> | ||
237 | + <rect key="frame" x="20" y="92.5" width="229" height="16"/> | ||
238 | + <fontDescription key="fontDescription" type="system" weight="heavy" pointSize="13"/> | ||
239 | + <color key="textColor" red="0.22745098039215686" green="0.32156862745098036" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> | ||
240 | + <nil key="highlightedColor"/> | ||
241 | + </label> | ||
242 | + </subviews> | ||
243 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
244 | + <constraints> | ||
245 | + <constraint firstItem="ZGH-0a-Rkp" firstAttribute="leading" secondItem="wwZ-Gb-7yh" secondAttribute="leading" constant="20" id="4Yc-Zt-HxN"/> | ||
246 | + <constraint firstAttribute="trailing" secondItem="bmR-su-WJq" secondAttribute="trailing" constant="50" id="9pk-KO-a1Y"/> | ||
247 | + <constraint firstItem="bmR-su-WJq" firstAttribute="top" relation="greaterThanOrEqual" secondItem="lIv-wc-Oa8" secondAttribute="bottom" constant="10" id="ANQ-pm-Yyq"/> | ||
248 | + <constraint firstItem="lIv-wc-Oa8" firstAttribute="leading" secondItem="wwZ-Gb-7yh" secondAttribute="leading" constant="20" id="B9J-43-oNK"/> | ||
249 | + <constraint firstAttribute="bottom" secondItem="bmR-su-WJq" secondAttribute="bottom" constant="10" id="Fvg-qp-N9E"/> | ||
250 | + <constraint firstItem="ZGH-0a-Rkp" firstAttribute="top" secondItem="wwZ-Gb-7yh" secondAttribute="top" constant="10" id="Gi7-z5-77i"/> | ||
251 | + <constraint firstAttribute="trailing" secondItem="ZGH-0a-Rkp" secondAttribute="trailing" constant="50" id="PG7-wf-QAy"/> | ||
252 | + <constraint firstItem="lIv-wc-Oa8" firstAttribute="top" secondItem="ZGH-0a-Rkp" secondAttribute="bottom" constant="5" id="Q38-gG-aEv"/> | ||
253 | + <constraint firstItem="VSX-eK-ySx" firstAttribute="leading" secondItem="wwZ-Gb-7yh" secondAttribute="leading" id="Y9x-oq-ILD"/> | ||
254 | + <constraint firstAttribute="trailing" secondItem="lIv-wc-Oa8" secondAttribute="trailing" constant="50" id="c6g-98-wki"/> | ||
255 | + <constraint firstAttribute="bottom" secondItem="VSX-eK-ySx" secondAttribute="bottom" id="q9c-Vl-fVw"/> | ||
256 | + <constraint firstItem="bmR-su-WJq" firstAttribute="leading" secondItem="wwZ-Gb-7yh" secondAttribute="leading" constant="20" id="vE8-Bg-FYa"/> | ||
257 | + <constraint firstItem="VSX-eK-ySx" firstAttribute="top" secondItem="wwZ-Gb-7yh" secondAttribute="top" id="yr6-GW-IDb"/> | ||
258 | + <constraint firstAttribute="trailing" secondItem="VSX-eK-ySx" secondAttribute="trailing" id="zFd-hP-12n"/> | ||
259 | + </constraints> | ||
260 | + </view> | ||
261 | + </subviews> | ||
262 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
263 | + <constraints> | ||
264 | + <constraint firstAttribute="trailing" secondItem="rO0-9o-lPR" secondAttribute="trailing" id="1ML-M9-7re"/> | ||
265 | + <constraint firstItem="wwZ-Gb-7yh" firstAttribute="leading" secondItem="gk0-7d-Ok4" secondAttribute="leading" id="4zX-6H-wCP"/> | ||
266 | + <constraint firstAttribute="bottom" secondItem="wwZ-Gb-7yh" secondAttribute="bottom" id="R9h-bH-ljJ"/> | ||
267 | + <constraint firstItem="rO0-9o-lPR" firstAttribute="leading" secondItem="gk0-7d-Ok4" secondAttribute="leading" id="hb1-Yj-WZD"/> | ||
268 | + <constraint firstAttribute="bottom" secondItem="rO0-9o-lPR" secondAttribute="bottom" id="j9C-vp-fe1"/> | ||
269 | + <constraint firstItem="wwZ-Gb-7yh" firstAttribute="width" secondItem="gk0-7d-Ok4" secondAttribute="width" multiplier="0.8" id="jgZ-ZW-oVV"/> | ||
270 | + <constraint firstItem="rO0-9o-lPR" firstAttribute="top" secondItem="gk0-7d-Ok4" secondAttribute="top" id="qFk-ry-HF3"/> | ||
271 | + <constraint firstItem="wwZ-Gb-7yh" firstAttribute="top" secondItem="gk0-7d-Ok4" secondAttribute="top" id="zzi-VV-ocs"/> | ||
272 | + </constraints> | ||
273 | + </view> | ||
274 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="new_icon" translatesAutoresizingMaskIntoConstraints="NO" id="aND-7C-8my"> | ||
275 | + <rect key="frame" x="344" y="5" width="60" height="25"/> | ||
276 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
277 | + <constraints> | ||
278 | + <constraint firstAttribute="height" constant="25" id="5w1-Ns-LaD"/> | ||
279 | + <constraint firstAttribute="width" constant="60" id="qpg-YF-cTr"/> | ||
280 | + </constraints> | ||
281 | + </imageView> | ||
282 | + </subviews> | ||
283 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
284 | + <constraints> | ||
285 | + <constraint firstItem="aND-7C-8my" firstAttribute="top" secondItem="1NS-DA-C6q" secondAttribute="top" constant="5" id="S0x-pU-bMz"/> | ||
286 | + <constraint firstAttribute="trailing" secondItem="gk0-7d-Ok4" secondAttribute="trailing" constant="20" id="SEs-Th-k5q"/> | ||
287 | + <constraint firstAttribute="trailing" secondItem="aND-7C-8my" secondAttribute="trailing" constant="10" id="Y9E-NQ-472"/> | ||
288 | + <constraint firstAttribute="bottom" secondItem="gk0-7d-Ok4" secondAttribute="bottom" id="c4V-jE-YBd"/> | ||
289 | + <constraint firstItem="gk0-7d-Ok4" firstAttribute="leading" secondItem="1NS-DA-C6q" secondAttribute="leading" constant="20" id="lp3-KZ-bXr"/> | ||
290 | + <constraint firstItem="gk0-7d-Ok4" firstAttribute="top" secondItem="1NS-DA-C6q" secondAttribute="top" id="oKk-Yf-0mh"/> | ||
291 | + </constraints> | ||
292 | + </tableViewCellContentView> | ||
293 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
294 | + <connections> | ||
295 | + <outlet property="campaignImage" destination="rO0-9o-lPR" id="21C-LT-mCP"/> | ||
296 | + <outlet property="campaignTitleLabel" destination="ZGH-0a-Rkp" id="1w1-Pc-dWs"/> | ||
297 | + <outlet property="curvedBgImage" destination="VSX-eK-ySx" id="p29-iQ-MLj"/> | ||
298 | + <outlet property="descriptionLabel" destination="bmR-su-WJq" id="orj-ih-tzY"/> | ||
299 | + <outlet property="inboxView" destination="gk0-7d-Ok4" id="2aq-Fz-Syv"/> | ||
300 | + <outlet property="newBadgeImage" destination="aND-7C-8my" id="WbU-ST-X2k"/> | ||
301 | + <outlet property="subtitleLabel" destination="lIv-wc-Oa8" id="cX1-SV-J5f"/> | ||
302 | + </connections> | ||
303 | + </tableViewCell> | ||
304 | + </prototypes> | ||
305 | + <connections> | ||
306 | + <outlet property="dataSource" destination="YRk-Az-LOb" id="y4z-it-fFH"/> | ||
307 | + <outlet property="delegate" destination="YRk-Az-LOb" id="xhM-mG-VTI"/> | ||
308 | + </connections> | ||
309 | + </tableView> | ||
310 | + </subviews> | ||
311 | + <color key="backgroundColor" red="0.21960784310000001" green="0.32156862749999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/> | ||
312 | + <constraints> | ||
313 | + <constraint firstAttribute="bottom" secondItem="A8b-3b-5xc" secondAttribute="bottom" id="9LG-av-UIJ"/> | ||
314 | + <constraint firstItem="A8b-3b-5xc" firstAttribute="top" secondItem="NSn-MS-EVn" secondAttribute="top" id="Gfl-IG-H5C"/> | ||
315 | + <constraint firstAttribute="trailing" secondItem="A8b-3b-5xc" secondAttribute="trailing" id="Xth-7O-TIk"/> | ||
316 | + <constraint firstItem="A8b-3b-5xc" firstAttribute="leading" secondItem="NSn-MS-EVn" secondAttribute="leading" id="bdZ-c7-9jg"/> | ||
317 | + </constraints> | ||
318 | + </view> | ||
319 | + </subviews> | ||
320 | + <viewLayoutGuide key="safeArea" id="THS-z4-i7u"/> | ||
197 | <color key="backgroundColor" systemColor="systemBackgroundColor"/> | 321 | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
322 | + <constraints> | ||
323 | + <constraint firstItem="NSn-MS-EVn" firstAttribute="leading" secondItem="TGQ-35-pS2" secondAttribute="leading" id="1yR-2j-n1K"/> | ||
324 | + <constraint firstAttribute="bottom" secondItem="NSn-MS-EVn" secondAttribute="bottom" id="97H-nf-IeO"/> | ||
325 | + <constraint firstAttribute="trailing" secondItem="NSn-MS-EVn" secondAttribute="trailing" id="KHn-sE-zOj"/> | ||
326 | + <constraint firstItem="NSn-MS-EVn" firstAttribute="top" secondItem="THS-z4-i7u" secondAttribute="top" id="ta6-jw-ZEk"/> | ||
327 | + </constraints> | ||
198 | </view> | 328 | </view> |
329 | + <connections> | ||
330 | + <outlet property="mainView" destination="NSn-MS-EVn" id="8Ux-Ip-hGi"/> | ||
331 | + <outlet property="tableView" destination="A8b-3b-5xc" id="0Nr-bb-I5x"/> | ||
332 | + </connections> | ||
199 | </viewController> | 333 | </viewController> |
200 | <placeholder placeholderIdentifier="IBFirstResponder" id="cet-Ta-bHg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | 334 | <placeholder placeholderIdentifier="IBFirstResponder" id="cet-Ta-bHg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> |
201 | </objects> | 335 | </objects> |
... | @@ -1266,6 +1400,7 @@ | ... | @@ -1266,6 +1400,7 @@ |
1266 | <image name="coupon_bg" width="196" height="64.5"/> | 1400 | <image name="coupon_bg" width="196" height="64.5"/> |
1267 | <image name="coupons_scrollview_dark" width="214" height="462"/> | 1401 | <image name="coupons_scrollview_dark" width="214" height="462"/> |
1268 | <image name="coupons_scrollview_white" width="214" height="462"/> | 1402 | <image name="coupons_scrollview_white" width="214" height="462"/> |
1403 | + <image name="curved_bg_white" width="159.5" height="118.5"/> | ||
1269 | <image name="dfy_logo_white" width="1611" height="395"/> | 1404 | <image name="dfy_logo_white" width="1611" height="395"/> |
1270 | <image name="ic_background_circle" width="214" height="134"/> | 1405 | <image name="ic_background_circle" width="214" height="134"/> |
1271 | <image name="ic_down_dark" width="22" height="11.5"/> | 1406 | <image name="ic_down_dark" width="22" height="11.5"/> | ... | ... |
SwiftWarplyFramework/SwiftWarplyFramework/Media.xcassets/curved_bg_white.imageset/Contents.json
0 → 100644
1 | +{ | ||
2 | + "images" : [ | ||
3 | + { | ||
4 | + "filename" : "curved_bg_white.png", | ||
5 | + "idiom" : "universal", | ||
6 | + "scale" : "1x" | ||
7 | + }, | ||
8 | + { | ||
9 | + "filename" : "curved_bg_white-1.png", | ||
10 | + "idiom" : "universal", | ||
11 | + "scale" : "2x" | ||
12 | + }, | ||
13 | + { | ||
14 | + "filename" : "curved_bg_white-2.png", | ||
15 | + "idiom" : "universal", | ||
16 | + "scale" : "3x" | ||
17 | + } | ||
18 | + ], | ||
19 | + "info" : { | ||
20 | + "author" : "xcode", | ||
21 | + "version" : 1 | ||
22 | + } | ||
23 | +} |
3.3 KB
3.3 KB
3.3 KB
... | @@ -391,6 +391,7 @@ public class swiftApi { | ... | @@ -391,6 +391,7 @@ public class swiftApi { |
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 | public let is_new: Bool? |
394 | + public let message: String? | ||
394 | 395 | ||
395 | init(dictionary: [String: Any]) { | 396 | init(dictionary: [String: Any]) { |
396 | self.index_url = dictionary["index_url"] as? String? ?? "" | 397 | self.index_url = dictionary["index_url"] as? String? ?? "" |
... | @@ -400,6 +401,7 @@ public class swiftApi { | ... | @@ -400,6 +401,7 @@ public class swiftApi { |
400 | self.subtitle = dictionary["subtitle"] as? String? ?? "" | 401 | self.subtitle = dictionary["subtitle"] as? String? ?? "" |
401 | self.session_uuid = dictionary["session_uuid"] as? String? ?? "" | 402 | self.session_uuid = dictionary["session_uuid"] as? String? ?? "" |
402 | self.is_new = dictionary["is_new"] as? Bool? ?? false | 403 | self.is_new = dictionary["is_new"] as? Bool? ?? false |
404 | + self.message = dictionary["message"] as? String? ?? "" | ||
403 | 405 | ||
404 | // let extra_fields = dictionary["extra_fields"] as? [String: Any]? ?? ["":""] | 406 | // let extra_fields = dictionary["extra_fields"] as? [String: Any]? ?? ["":""] |
405 | let extra_fields = dictionary["extra_fields"] as AnyObject | 407 | let extra_fields = dictionary["extra_fields"] as AnyObject | ... | ... |
-
Please register or login to post a comment