Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-08-30 19:26:07 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
252bec517aa0c7162afbfe326ce9b977cd6eda4b
252bec51
1 parent
4a5f4d90
fix telco banner at MFYVC
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/MFYInboxTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/MFYInboxTableViewCell.swift
View file @
252bec5
...
...
@@ -57,4 +57,17 @@ import UIKit
}
}
func
configureCell
(
ccms
:
swiftApi
.
LoyaltyContextualOfferModel
)
{
campaignImage
.
load
(
link
:
ccms
.
_imageUrl
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
campaignTitleLabel
.
text
=
ccms
.
_title
campaignTitleLabel
.
font
=
UIFont
(
name
:
"PFSquareSansPro-BoldItalic"
,
size
:
18
)
subtitleLabel
.
text
=
ccms
.
_subtitle
subtitleLabel
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Regular"
,
size
:
16
)
descriptionLabel
.
text
=
ccms
.
_description
descriptionLabel
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Bold"
,
size
:
14
)
newBadgeImage
.
isHidden
=
true
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
View file @
252bec5
...
...
@@ -73,7 +73,22 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
public
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"MFYInboxTableViewCellId"
,
for
:
indexPath
)
as!
MFYInboxTableViewCell
if
(
campaigns
[
indexPath
.
row
]
.
_type
!=
nil
&&
campaigns
[
indexPath
.
row
]
.
_type
==
"telco"
)
{
let
ccmsCampaigns
=
swiftApi
()
.
getCCMSLoyaltyCampaigns
()
let
loyaltyCampaignIdExists
=
ccmsCampaigns
.
contains
{
$0
.
_loyaltyCampaignId
==
campaigns
[
indexPath
.
row
]
.
session_uuid
}
if
(
loyaltyCampaignIdExists
==
true
)
{
for
item
in
ccmsCampaigns
{
if
(
item
.
_loyaltyCampaignId
==
campaigns
[
indexPath
.
row
]
.
session_uuid
)
{
cell
.
configureCell
(
ccms
:
item
)
break
;
}
}
}
}
else
{
cell
.
configureCell
(
campaign
:
campaigns
[
indexPath
.
row
])
}
return
cell
}
...
...
Please
register
or
login
to post a comment