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
2025-05-26 17:02:45 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b5e30f99283a95cd9b4e4d511d1fd3ba7423ccb1
b5e30f99
1 parent
0d97b07e
reward offers fixes
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsOffersScrollTableViewCell/MyRewardsOffersScrollTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsOffersScrollTableViewCell/MyRewardsOffersScrollTableViewCell.xib
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
b5e30f9
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsOffersScrollTableViewCell/MyRewardsOffersScrollTableViewCell.swift
View file @
b5e30f9
...
...
@@ -26,9 +26,11 @@ import UIKit
allButtonLabel
.
text
=
"Όλα"
allButtonLabel
.
font
=
UIFont
(
name
:
"PingLCG-Regular"
,
size
:
16
)
allButtonLabel
.
textColor
=
UIColor
(
rgb
:
0x00111B
)
allButtonLabel
.
frame
.
size
.
width
=
allButtonLabel
.
intrinsicContentSize
.
width
allButtonLabel
.
frame
.
size
.
height
=
allButtonLabel
.
intrinsicContentSize
.
height
// Register XIBs for collection view cells
collectionView
.
register
(
UINib
(
nibName
:
"MyRewards
BannerOfferCollectionViewCell"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
)),
forCellWithReuseIdentifier
:
"MyRewardsBanner
OfferCollectionViewCell"
)
collectionView
.
register
(
UINib
(
nibName
:
"MyRewards
OfferCollectionViewCell"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
)),
forCellWithReuseIdentifier
:
"MyRewards
OfferCollectionViewCell"
)
// Fix background colors
collectionView
.
backgroundColor
=
UIColor
.
clear
...
...
@@ -68,17 +70,10 @@ import UIKit
}
func
configureCell
(
data
:
SectionModel
?)
{
// struct SectionModel {
// let title: String
// let count: Int
// let offers: [OfferModel]
// }
self
.
data
=
data
let
catBoldText
=
(
data
?
.
title
??
""
)
+
" "
let
catRegText
=
String
(
data
?
.
count
??
0
)
let
catRegText
=
"("
+
String
(
data
?
.
count
??
0
)
+
")"
let
attrBold
=
[
NSAttributedString
.
Key
.
font
:
UIFont
(
name
:
"PingLCG-Bold"
,
size
:
18
)
??
UIFont
.
boldSystemFont
(
ofSize
:
17
),
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
(
rgb
:
0x000F1E
)]
let
attrRegular
=
[
NSAttributedString
.
Key
.
font
:
UIFont
(
name
:
"PingLCG-Regular"
,
size
:
18
)
??
UIFont
.
systemFont
(
ofSize
:
17
),
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
(
rgb
:
0x000F1E
)]
...
...
@@ -106,7 +101,7 @@ extension MyRewardsOffersScrollTableViewCell: UICollectionViewDataSource, UICol
}
public
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
"MyRewards
BannerOfferCollectionViewCell"
,
for
:
indexPath
)
as!
MyRewardsBanner
OfferCollectionViewCell
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
"MyRewards
OfferCollectionViewCell"
,
for
:
indexPath
)
as!
MyRewards
OfferCollectionViewCell
// cell.configureCell(offer: self.data?.offers[indexPath.row])
if
let
offer
=
self
.
data
?
.
offers
[
indexPath
.
row
]
{
cell
.
configureCell
(
data
:
offer
)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsOffersScrollTableViewCell/MyRewardsOffersScrollTableViewCell.xib
View file @
b5e30f9
...
...
@@ -31,7 +31,7 @@
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"9Qp-M4-KdO"
>
<rect
key=
"frame"
x=
"280"
y=
"0.0"
width=
"75"
height=
"35"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Όλα"
textAlignment=
"
natural
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"KGA-M6-mox"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Όλα"
textAlignment=
"
center
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"KGA-M6-mox"
>
<rect
key=
"frame"
x=
"17"
y=
"7"
width=
"41"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<nil
key=
"textColor"
/>
...
...
@@ -93,7 +93,7 @@
<constraint
firstItem=
"E9Q-uB-Uvd"
firstAttribute=
"top"
secondItem=
"iQa-jk-pTS"
secondAttribute=
"bottom"
constant=
"5"
id=
"BbT-IJ-sg4"
/>
<constraint
firstItem=
"iQa-jk-pTS"
firstAttribute=
"leading"
secondItem=
"3yR-f0-cq6"
secondAttribute=
"leading"
constant=
"24"
id=
"C0X-4S-oP1"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"E9Q-uB-Uvd"
secondAttribute=
"trailing"
id=
"KNV-Sk-0rr"
/>
<constraint
firstItem=
"iQa-jk-pTS"
firstAttribute=
"top"
secondItem=
"3yR-f0-cq6"
secondAttribute=
"top"
constant=
"
6
0"
id=
"Saf-QC-O71"
/>
<constraint
firstItem=
"iQa-jk-pTS"
firstAttribute=
"top"
secondItem=
"3yR-f0-cq6"
secondAttribute=
"top"
constant=
"
5
0"
id=
"Saf-QC-O71"
/>
<constraint
firstItem=
"E9Q-uB-Uvd"
firstAttribute=
"leading"
secondItem=
"3yR-f0-cq6"
secondAttribute=
"leading"
id=
"ToF-ce-EMM"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"E9Q-uB-Uvd"
secondAttribute=
"bottom"
id=
"ssj-8N-2gP"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"iQa-jk-pTS"
secondAttribute=
"trailing"
constant=
"24"
id=
"zI6-rP-3kk"
/>
...
...
Please
register
or
login
to post a comment