Manos Chorianopoulos

add MFYViewController

......@@ -13,6 +13,7 @@
1EA2BB792865BFE8003F2AB0 /* InboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */; };
1EB5F4C828536FD60016F36E /* StepsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C728536FD60016F36E /* StepsViewController.swift */; };
1EB5F4CA285370C90016F36E /* LoyaltyAnalysisViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */; };
1EBE97212865EE460080EFF7 /* MFYInboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */; };
1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */ = {isa = PBXBuildFile; productRef = 1EBF5F062840E13F00B8B17F /* SwiftEventBus */; };
7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */; };
E6A77853282933340045BBA8 /* SwiftWarplyFramework.docc in Sources */ = {isa = PBXBuildFile; fileRef = E6A77852282933340045BBA8 /* SwiftWarplyFramework.docc */; };
......@@ -149,6 +150,7 @@
1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxTableViewCell.swift; sourceTree = "<group>"; };
1EB5F4C728536FD60016F36E /* StepsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsViewController.swift; sourceTree = "<group>"; };
1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyAnalysisViewController.swift; sourceTree = "<group>"; };
1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MFYInboxTableViewCell.swift; sourceTree = "<group>"; };
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>"; };
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>"; };
C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftWarplyFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -340,6 +342,7 @@
E6A77863282933E50045BBA8 /* DetailsViewController.swift */,
E6A778DE282933E60045BBA8 /* GiftsViewController.swift */,
1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */,
1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */,
E6A778DB282933E60045BBA8 /* MFYViewController.swift */,
E6A7785F282933E40045BBA8 /* WalletViewController.swift */,
E6A77A31282BA9C60045BBA8 /* CampaignViewController.swift */,
......@@ -791,6 +794,7 @@
E6A778ED282933E60045BBA8 /* WLCustomNativeCollectionViewCell.m in Sources */,
E6A7790D282933E60045BBA8 /* WLLocationManager.m in Sources */,
E6A7793D282933E70045BBA8 /* AFURLResponseSerialization.m in Sources */,
1EBE97212865EE460080EFF7 /* MFYInboxTableViewCell.swift in Sources */,
E6A778FD282933E60045BBA8 /* WLInboxItem.m in Sources */,
E6A778EE282933E60045BBA8 /* WLNativeAdsTableMode.m in Sources */,
E6A778DF282933E60045BBA8 /* WarplyReactMethods.m in Sources */,
......
//
// MFYInboxTableViewCell.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 24/6/22.
//
import UIKit
@objc public class MFYInboxTableViewCell: UITableViewCell {
@IBOutlet weak var inboxView: UIView!
@IBOutlet weak var campaignImage: UIImageView!
@IBOutlet weak var newBadgeImage: UIImageView!
@IBOutlet weak var campaignTitleLabel: UILabel!
@IBOutlet weak var curvedBgImage: UIImageView!
@IBOutlet weak var subtitleLabel: UILabel!
@IBOutlet weak var descriptionLabel: UILabel!
public override func awakeFromNib() {
super.awakeFromNib()
inboxView.layer.cornerRadius = 5.0
inboxView.clipsToBounds = true
newBadgeImage.image = UIImage(named: "new_icon", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
curvedBgImage.image = UIImage(named: "curved_bg_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
newBadgeImage.isHidden = true
}
public override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
public override func layoutSubviews() {
super.layoutSubviews()
//set the values for top,left,bottom,right margins
let margins = UIEdgeInsets(top: 0, left: 0, bottom: 10, right: 0)
contentView.frame = contentView.frame.inset(by: margins)
}
func configureCell(campaign: swiftApi.CampaignItemModel) {
campaignImage.load(link: campaign.logo_url ?? "", placeholder: UIImage(), cache: URLCache())
campaignTitleLabel.text = campaign.title ?? ""
subtitleLabel.text = campaign.subtitle ?? ""
descriptionLabel.text = campaign.message ?? ""
if (campaign.is_new ?? false) {
newBadgeImage.isHidden = false
}
}
}
......@@ -9,9 +9,87 @@ import Foundation
import UIKit
@objc public class MFYViewController: UIViewController {
public override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
@IBOutlet weak var mainView: UIView!
@IBOutlet weak var tableView: UITableView!
public var campaigns:Array<swiftApi.CampaignItemModel> = []
public override func viewDidLoad() {
super.viewDidLoad()
getCampaignsRequest()
setBackButton()
setNavigationTitle("More for you")
setNavigationTitle("MORE for YOU")
tableView.delegate = self
tableView.dataSource = self
tableView.clipsToBounds = true
tableView.layer.cornerRadius = 30
tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
tableView.contentInset.top = 50
// Add Top left corner radius
mainView.clipsToBounds = true
mainView.layer.cornerRadius = 30
mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00)
}
func getCampaignsRequest() {
swiftApi().getCampaignsAsync(getCampaignsCallback)
}
func getCampaignsCallback (_ campaignsData: Array<swiftApi.CampaignItemModel>?) -> Void {
if (campaignsData != nil) {
self.campaigns = campaignsData?.filter { $0.offer_category == "more_for_you" } ?? []
DispatchQueue.main.async {
self.tableView.reloadData()
swiftApi().setUniqueCampaignList(campaignsData ?? [])
}
} else {
self.campaigns = []
}
}
}
// MARK: - TableView
extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
public func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.campaigns.count
}
public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 220.0 + 10.0
// return UITableViewAutomaticDimension
}
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "MFYInboxTableViewCellId", for: indexPath) as! MFYInboxTableViewCell
cell.configureCell(campaign: campaigns[indexPath.row])
return cell
}
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! CampaignViewController
let url = swiftApi().constructCampaignUrl(campaigns[indexPath.row])
vc.campaignUrl = url
self.navigationController?.pushViewController(vc, animated: true)
}
}
......
......@@ -190,12 +190,146 @@
<scene sceneID="g5j-BC-VRb">
<objects>
<viewController storyboardIdentifier="MFYViewController" id="YRk-Az-LOb" customClass="MFYViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="iEB-He-DJV">
<view key="view" contentMode="scaleToFill" id="TGQ-35-pS2">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="eXr-I0-rkv"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NSn-MS-EVn" userLabel="Main View">
<rect key="frame" x="0.0" y="44" width="414" height="852"/>
<subviews>
<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">
<rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<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">
<rect key="frame" x="0.0" y="44.5" width="414" height="118.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TRe-Ck-sF8" id="1NS-DA-C6q">
<rect key="frame" x="0.0" y="0.0" width="414" height="118.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gk0-7d-Ok4">
<rect key="frame" x="20" y="0.0" width="374" height="118.5"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rO0-9o-lPR">
<rect key="frame" x="0.0" y="0.0" width="374" height="118.5"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wwZ-Gb-7yh" userLabel="InfoView">
<rect key="frame" x="0.0" y="0.0" width="299" height="118.5"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="curved_bg_white" translatesAutoresizingMaskIntoConstraints="NO" id="VSX-eK-ySx">
<rect key="frame" x="0.0" y="0.0" width="299" height="118.5"/>
</imageView>
<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">
<rect key="frame" x="20" y="10" width="229" height="20.5"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="17"/>
<color key="textColor" red="0.22745098039215686" green="0.32156862745098036" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<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">
<rect key="frame" x="20" y="35.5" width="229" height="18"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
<color key="textColor" red="0.22745098039215686" green="0.32156862745098036" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<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">
<rect key="frame" x="20" y="92.5" width="229" height="16"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="13"/>
<color key="textColor" red="0.22745098039215686" green="0.32156862745098036" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="ZGH-0a-Rkp" firstAttribute="leading" secondItem="wwZ-Gb-7yh" secondAttribute="leading" constant="20" id="4Yc-Zt-HxN"/>
<constraint firstAttribute="trailing" secondItem="bmR-su-WJq" secondAttribute="trailing" constant="50" id="9pk-KO-a1Y"/>
<constraint firstItem="bmR-su-WJq" firstAttribute="top" relation="greaterThanOrEqual" secondItem="lIv-wc-Oa8" secondAttribute="bottom" constant="10" id="ANQ-pm-Yyq"/>
<constraint firstItem="lIv-wc-Oa8" firstAttribute="leading" secondItem="wwZ-Gb-7yh" secondAttribute="leading" constant="20" id="B9J-43-oNK"/>
<constraint firstAttribute="bottom" secondItem="bmR-su-WJq" secondAttribute="bottom" constant="10" id="Fvg-qp-N9E"/>
<constraint firstItem="ZGH-0a-Rkp" firstAttribute="top" secondItem="wwZ-Gb-7yh" secondAttribute="top" constant="10" id="Gi7-z5-77i"/>
<constraint firstAttribute="trailing" secondItem="ZGH-0a-Rkp" secondAttribute="trailing" constant="50" id="PG7-wf-QAy"/>
<constraint firstItem="lIv-wc-Oa8" firstAttribute="top" secondItem="ZGH-0a-Rkp" secondAttribute="bottom" constant="5" id="Q38-gG-aEv"/>
<constraint firstItem="VSX-eK-ySx" firstAttribute="leading" secondItem="wwZ-Gb-7yh" secondAttribute="leading" id="Y9x-oq-ILD"/>
<constraint firstAttribute="trailing" secondItem="lIv-wc-Oa8" secondAttribute="trailing" constant="50" id="c6g-98-wki"/>
<constraint firstAttribute="bottom" secondItem="VSX-eK-ySx" secondAttribute="bottom" id="q9c-Vl-fVw"/>
<constraint firstItem="bmR-su-WJq" firstAttribute="leading" secondItem="wwZ-Gb-7yh" secondAttribute="leading" constant="20" id="vE8-Bg-FYa"/>
<constraint firstItem="VSX-eK-ySx" firstAttribute="top" secondItem="wwZ-Gb-7yh" secondAttribute="top" id="yr6-GW-IDb"/>
<constraint firstAttribute="trailing" secondItem="VSX-eK-ySx" secondAttribute="trailing" id="zFd-hP-12n"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="rO0-9o-lPR" secondAttribute="trailing" id="1ML-M9-7re"/>
<constraint firstItem="wwZ-Gb-7yh" firstAttribute="leading" secondItem="gk0-7d-Ok4" secondAttribute="leading" id="4zX-6H-wCP"/>
<constraint firstAttribute="bottom" secondItem="wwZ-Gb-7yh" secondAttribute="bottom" id="R9h-bH-ljJ"/>
<constraint firstItem="rO0-9o-lPR" firstAttribute="leading" secondItem="gk0-7d-Ok4" secondAttribute="leading" id="hb1-Yj-WZD"/>
<constraint firstAttribute="bottom" secondItem="rO0-9o-lPR" secondAttribute="bottom" id="j9C-vp-fe1"/>
<constraint firstItem="wwZ-Gb-7yh" firstAttribute="width" secondItem="gk0-7d-Ok4" secondAttribute="width" multiplier="0.8" id="jgZ-ZW-oVV"/>
<constraint firstItem="rO0-9o-lPR" firstAttribute="top" secondItem="gk0-7d-Ok4" secondAttribute="top" id="qFk-ry-HF3"/>
<constraint firstItem="wwZ-Gb-7yh" firstAttribute="top" secondItem="gk0-7d-Ok4" secondAttribute="top" id="zzi-VV-ocs"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="new_icon" translatesAutoresizingMaskIntoConstraints="NO" id="aND-7C-8my">
<rect key="frame" x="344" y="5" width="60" height="25"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="5w1-Ns-LaD"/>
<constraint firstAttribute="width" constant="60" id="qpg-YF-cTr"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="aND-7C-8my" firstAttribute="top" secondItem="1NS-DA-C6q" secondAttribute="top" constant="5" id="S0x-pU-bMz"/>
<constraint firstAttribute="trailing" secondItem="gk0-7d-Ok4" secondAttribute="trailing" constant="20" id="SEs-Th-k5q"/>
<constraint firstAttribute="trailing" secondItem="aND-7C-8my" secondAttribute="trailing" constant="10" id="Y9E-NQ-472"/>
<constraint firstAttribute="bottom" secondItem="gk0-7d-Ok4" secondAttribute="bottom" id="c4V-jE-YBd"/>
<constraint firstItem="gk0-7d-Ok4" firstAttribute="leading" secondItem="1NS-DA-C6q" secondAttribute="leading" constant="20" id="lp3-KZ-bXr"/>
<constraint firstItem="gk0-7d-Ok4" firstAttribute="top" secondItem="1NS-DA-C6q" secondAttribute="top" id="oKk-Yf-0mh"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="campaignImage" destination="rO0-9o-lPR" id="21C-LT-mCP"/>
<outlet property="campaignTitleLabel" destination="ZGH-0a-Rkp" id="1w1-Pc-dWs"/>
<outlet property="curvedBgImage" destination="VSX-eK-ySx" id="p29-iQ-MLj"/>
<outlet property="descriptionLabel" destination="bmR-su-WJq" id="orj-ih-tzY"/>
<outlet property="inboxView" destination="gk0-7d-Ok4" id="2aq-Fz-Syv"/>
<outlet property="newBadgeImage" destination="aND-7C-8my" id="WbU-ST-X2k"/>
<outlet property="subtitleLabel" destination="lIv-wc-Oa8" id="cX1-SV-J5f"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="YRk-Az-LOb" id="y4z-it-fFH"/>
<outlet property="delegate" destination="YRk-Az-LOb" id="xhM-mG-VTI"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" red="0.21960784310000001" green="0.32156862749999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="A8b-3b-5xc" secondAttribute="bottom" id="9LG-av-UIJ"/>
<constraint firstItem="A8b-3b-5xc" firstAttribute="top" secondItem="NSn-MS-EVn" secondAttribute="top" id="Gfl-IG-H5C"/>
<constraint firstAttribute="trailing" secondItem="A8b-3b-5xc" secondAttribute="trailing" id="Xth-7O-TIk"/>
<constraint firstItem="A8b-3b-5xc" firstAttribute="leading" secondItem="NSn-MS-EVn" secondAttribute="leading" id="bdZ-c7-9jg"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="THS-z4-i7u"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="NSn-MS-EVn" firstAttribute="leading" secondItem="TGQ-35-pS2" secondAttribute="leading" id="1yR-2j-n1K"/>
<constraint firstAttribute="bottom" secondItem="NSn-MS-EVn" secondAttribute="bottom" id="97H-nf-IeO"/>
<constraint firstAttribute="trailing" secondItem="NSn-MS-EVn" secondAttribute="trailing" id="KHn-sE-zOj"/>
<constraint firstItem="NSn-MS-EVn" firstAttribute="top" secondItem="THS-z4-i7u" secondAttribute="top" id="ta6-jw-ZEk"/>
</constraints>
</view>
<connections>
<outlet property="mainView" destination="NSn-MS-EVn" id="8Ux-Ip-hGi"/>
<outlet property="tableView" destination="A8b-3b-5xc" id="0Nr-bb-I5x"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="cet-Ta-bHg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
......@@ -1266,6 +1400,7 @@
<image name="coupon_bg" width="196" height="64.5"/>
<image name="coupons_scrollview_dark" width="214" height="462"/>
<image name="coupons_scrollview_white" width="214" height="462"/>
<image name="curved_bg_white" width="159.5" height="118.5"/>
<image name="dfy_logo_white" width="1611" height="395"/>
<image name="ic_background_circle" width="214" height="134"/>
<image name="ic_down_dark" width="22" height="11.5"/>
......
{
"images" : [
{
"filename" : "curved_bg_white.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "curved_bg_white-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "curved_bg_white-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -391,6 +391,7 @@ public class swiftApi {
public let session_uuid: String?
public let subcategory: String?
public let is_new: Bool?
public let message: String?
init(dictionary: [String: Any]) {
self.index_url = dictionary["index_url"] as? String? ?? ""
......@@ -400,6 +401,7 @@ public class swiftApi {
self.subtitle = dictionary["subtitle"] as? String? ?? ""
self.session_uuid = dictionary["session_uuid"] as? String? ?? ""
self.is_new = dictionary["is_new"] as? Bool? ?? false
self.message = dictionary["message"] as? String? ?? ""
// let extra_fields = dictionary["extra_fields"] as? [String: Any]? ?? ["":""]
let extra_fields = dictionary["extra_fields"] as AnyObject
......