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
2026-03-20 12:12:42 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
97457dee841685254afd88760358e79214cfc3e8
97457dee
1 parent
66aa70d6
couponset fixes
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
16 deletions
SwiftWarplyFramework/SwiftWarplyFramework/cells/CategoryOfferCollectionViewCell/CategoryOfferCollectionViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/cells/CategoryOfferCollectionViewCell/CategoryOfferCollectionViewCell.xib
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsOfferCollectionViewCell/MyRewardsOfferCollectionViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/cells/CategoryOfferCollectionViewCell/CategoryOfferCollectionViewCell.swift
View file @
97457de
...
...
@@ -11,6 +11,7 @@ import UIKit
public
class
CategoryOfferCollectionViewCell
:
UICollectionViewCell
{
@IBOutlet
weak
var
parentView
:
UIView
!
@IBOutlet
weak
var
bannerImage
:
UIImageView
!
@IBOutlet
weak
var
merchantLogoView
:
UIView
!
@IBOutlet
weak
var
logoImage
:
UIImageView
!
@IBOutlet
weak
var
discountView
:
UIView
!
@IBOutlet
weak
var
discountLabel
:
UILabel
!
...
...
@@ -61,8 +62,12 @@ public class CategoryOfferCollectionViewCell: UICollectionViewCell {
parentView
.
layer
.
cornerRadius
=
12.0
parentView
.
clipsToBounds
=
true
discountView
.
layer
.
cornerRadius
=
17.0
discountView
.
layer
.
cornerRadius
=
discountView
.
bounds
.
height
/
2
discountView
.
clipsToBounds
=
true
merchantLogoView
.
backgroundColor
=
UIColor
(
rgb
:
0xFFFFFF
)
merchantLogoView
.
layer
.
cornerRadius
=
10.0
merchantLogoView
.
clipsToBounds
=
true
}
func
configureCell
(
data
:
CouponSetItemModel
)
{
...
...
@@ -99,8 +104,8 @@ public class CategoryOfferCollectionViewCell: UICollectionViewCell {
expirationLabel
.
textColor
=
UIColor
(
rgb
:
0x9BA1A6
)
// Use merchant logo from bound merchant data
if
let
merchant
=
data
.
_merchant
,
!
merchant
.
_
img_preview
.
isEmpty
{
self
.
logoImageURL
=
merchant
.
_
img_preview
if
let
merchant
=
data
.
_merchant
,
!
merchant
.
_
preview_img
.
isEmpty
{
self
.
logoImageURL
=
merchant
.
_
preview_img
}
else
{
self
.
logoImageURL
=
nil
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/cells/CategoryOfferCollectionViewCell/CategoryOfferCollectionViewCell.xib
View file @
97457de
...
...
@@ -25,18 +25,30 @@
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"cM3-Rs-tV7"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"170"
height=
"140"
/>
</imageView>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"dN4-St-uW8"
>
<rect
key=
"frame"
x=
"61"
y=
"46"
width=
"48"
height=
"48"
/>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"5Rg-gJ-eWP"
userLabel=
"MerchantLogoView"
>
<rect
key=
"frame"
x=
"59.666666666666657"
y=
"44.666666666666657"
width=
"51"
height=
"51"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"dN4-St-uW8"
>
<rect
key=
"frame"
x=
"1.3333333333333357"
y=
"1.3333333333333357"
width=
"48"
height=
"48"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"48"
id=
"eO5-Tu-vX9"
/>
<constraint
firstAttribute=
"height"
constant=
"48"
id=
"fP6-Uv-wY0"
/>
</constraints>
</imageView>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"48"
id=
"eO5-Tu-vX9"
/>
<constraint
firstAttribute=
"height"
constant=
"48"
id=
"fP6-Uv-wY0"
/>
<constraint
firstItem=
"dN4-St-uW8"
firstAttribute=
"centerY"
secondItem=
"5Rg-gJ-eWP"
secondAttribute=
"centerY"
id=
"Xlp-xw-USg"
/>
<constraint
firstAttribute=
"height"
constant=
"51"
id=
"k9D-2T-a4U"
/>
<constraint
firstAttribute=
"width"
constant=
"51"
id=
"kpd-Cy-QdD"
/>
<constraint
firstItem=
"dN4-St-uW8"
firstAttribute=
"centerX"
secondItem=
"5Rg-gJ-eWP"
secondAttribute=
"centerX"
id=
"lwO-HT-CNd"
/>
</constraints>
</
imageV
iew>
</
v
iew>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"gQ7-Vw-xZ1"
userLabel=
"discountView"
>
<rect
key=
"frame"
x=
"12
8"
y=
"8"
width=
"34"
height=
"34
"
/>
<rect
key=
"frame"
x=
"12
1"
y=
"8"
width=
"41"
height=
"41
"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"center"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"%"
textAlignment=
"center"
lineBreakMode=
"middleTruncation"
baselineAdjustment=
"alignBaselines"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"hR8-Wx-yA2"
>
<rect
key=
"frame"
x=
"2"
y=
"2"
width=
"3
0"
height=
"30
"
/>
<rect
key=
"frame"
x=
"2"
y=
"2"
width=
"3
7"
height=
"37
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -44,8 +56,8 @@
</subviews>
<color
key=
"backgroundColor"
red=
"0.79600000000000004"
green=
"0.79600000000000004"
blue=
"0.79600000000000004"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"
34
"
id=
"iS9-Xy-zB3"
/>
<constraint
firstAttribute=
"height"
constant=
"
34
"
id=
"jT0-Yz-AC4"
/>
<constraint
firstAttribute=
"width"
constant=
"
41
"
id=
"iS9-Xy-zB3"
/>
<constraint
firstAttribute=
"height"
constant=
"
41
"
id=
"jT0-Yz-AC4"
/>
<constraint
firstItem=
"hR8-Wx-yA2"
firstAttribute=
"top"
secondItem=
"gQ7-Vw-xZ1"
secondAttribute=
"top"
constant=
"2"
id=
"kU1-Za-BD5"
/>
<constraint
firstItem=
"hR8-Wx-yA2"
firstAttribute=
"leading"
secondItem=
"gQ7-Vw-xZ1"
secondAttribute=
"leading"
constant=
"2"
id=
"lV2-Ab-CE6"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"hR8-Wx-yA2"
secondAttribute=
"trailing"
constant=
"2"
id=
"mW3-Bc-DF7"
/>
...
...
@@ -55,12 +67,12 @@
</subviews>
<color
key=
"backgroundColor"
red=
"0.93700000000000006"
green=
"0.94099999999999995"
blue=
"0.94499999999999995"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstItem=
"5Rg-gJ-eWP"
firstAttribute=
"centerY"
secondItem=
"bL2-Qr-sU6"
secondAttribute=
"centerY"
id=
"79F-Ln-if0"
/>
<constraint
firstItem=
"5Rg-gJ-eWP"
firstAttribute=
"centerX"
secondItem=
"bL2-Qr-sU6"
secondAttribute=
"centerX"
id=
"Llr-kz-Q2U"
/>
<constraint
firstItem=
"cM3-Rs-tV7"
firstAttribute=
"top"
secondItem=
"bL2-Qr-sU6"
secondAttribute=
"top"
id=
"oY5-De-FH9"
/>
<constraint
firstItem=
"cM3-Rs-tV7"
firstAttribute=
"leading"
secondItem=
"bL2-Qr-sU6"
secondAttribute=
"leading"
id=
"pZ6-Ef-GI0"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"cM3-Rs-tV7"
secondAttribute=
"trailing"
id=
"qA7-Fg-HJ1"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"cM3-Rs-tV7"
secondAttribute=
"bottom"
id=
"rB8-Gh-IK2"
/>
<constraint
firstItem=
"dN4-St-uW8"
firstAttribute=
"centerX"
secondItem=
"bL2-Qr-sU6"
secondAttribute=
"centerX"
id=
"sC9-Hi-JL3"
/>
<constraint
firstItem=
"dN4-St-uW8"
firstAttribute=
"centerY"
secondItem=
"bL2-Qr-sU6"
secondAttribute=
"centerY"
id=
"tD0-Ij-KM4"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"gQ7-Vw-xZ1"
secondAttribute=
"trailing"
constant=
"8"
id=
"uE1-Jk-LN5"
/>
<constraint
firstItem=
"gQ7-Vw-xZ1"
firstAttribute=
"top"
secondItem=
"bL2-Qr-sU6"
secondAttribute=
"top"
constant=
"8"
id=
"vF2-Kl-MO6"
/>
<constraint
firstAttribute=
"height"
constant=
"140"
id=
"wG3-Lm-NP7"
/>
...
...
@@ -138,6 +150,7 @@
<outlet
property=
"discountView"
destination=
"gQ7-Vw-xZ1"
id=
"BL4-Qr-SU8"
/>
<outlet
property=
"expirationLabel"
destination=
"BL8-Qr-SU2"
id=
"CM5-Rs-TV9"
/>
<outlet
property=
"logoImage"
destination=
"dN4-St-uW8"
id=
"DN6-St-UW0"
/>
<outlet
property=
"merchantLogoView"
destination=
"5Rg-gJ-eWP"
id=
"9PO-A2-aZM"
/>
<outlet
property=
"merchantNameLabel"
destination=
"yI5-No-PR9"
id=
"EO7-Tu-VX1"
/>
<outlet
property=
"parentView"
destination=
"aK1-Pq-rT5"
id=
"FP8-Uv-WY2"
/>
<outlet
property=
"subtitleLabel"
destination=
"AK7-Pq-RT1"
id=
"GQ9-Vw-XZ3"
/>
...
...
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsOfferCollectionViewCell/MyRewardsOfferCollectionViewCell.swift
View file @
97457de
...
...
@@ -67,6 +67,7 @@ public class MyRewardsOfferCollectionViewCell: UICollectionViewCell {
discountView
.
layer
.
cornerRadius
=
34.0
bannerImage
.
backgroundColor
=
UIColor
(
rgb
:
0xE7E7E7
)
}
func
configureCell
(
data
:
OfferModel
)
{
...
...
@@ -146,9 +147,9 @@ public class MyRewardsOfferCollectionViewCell: UICollectionViewCell {
expirationLabel
.
textColor
=
UIColor
(
rgb
:
0x9BA1A6
)
// Use merchant logo from bound merchant data
if
let
merchant
=
data
.
_merchant
,
!
merchant
.
_
img_preview
.
isEmpty
{
if
let
merchant
=
data
.
_merchant
,
!
merchant
.
_
preview_img
.
isEmpty
{
// Use merchant's img_preview for logo
self
.
logoImageURL
=
merchant
.
_
img_preview
self
.
logoImageURL
=
merchant
.
_
preview_img
}
else
{
self
.
logoImageURL
=
nil
}
...
...
Please
register
or
login
to post a comment