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-10-27 10:53:49 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7a22e269c614d58dcb3ef3186b9c50e98b9bedc8
7a22e269
1 parent
ca0cec63
fix image caching at coupon cell
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CouponsTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponsTableViewCell.swift
View file @
7a22e26
...
...
@@ -16,6 +16,24 @@ import UIKit
@IBOutlet
weak
var
dicountLabel
:
UILabel
!
@IBOutlet
weak
var
discriptionLabel
:
UILabel
!
@IBOutlet
weak
var
expirationLabel
:
UILabel
!
var
postImageURL
:
String
?
{
didSet
{
if
let
url
=
postImageURL
{
self
.
couponImage
.
image
=
UIImage
()
// UIImage(named: "loading")
UIImage
.
loadImageUsingCacheWithUrlString
(
url
)
{
image
in
// set the image only when we are still displaying the content for the image we finished downloading
if
url
==
self
.
postImageURL
{
self
.
couponImage
.
image
=
image
}
}
}
else
{
self
.
couponImage
.
image
=
nil
}
}
}
public
override
func
awakeFromNib
()
{
...
...
@@ -54,7 +72,8 @@ import UIKit
for
merchant
in
merchantList
{
if
(
merchant
.
_uuid
==
couponSetData
?
.
merchant_uuid
)
{
couponImage
.
load
(
link
:
merchant
.
_img_preview
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
// couponImage.load(link: merchant._img_preview, placeholder: UIImage(), cache: URLCache())
self
.
postImageURL
=
merchant
.
_img_preview
nameLabel
.
text
=
merchant
.
_admin_name
break
;
}
...
...
Please
register
or
login
to post a comment