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 12:46:18 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
89db082bb6ac985ad7b9a1fc8da47e109c1ac9d8
89db082b
1 parent
4ddb5a4d
MyRewardsBannerOffersScrollTableViewCell collectionView fixes
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
14 deletions
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsBannerOffersScrollTableViewCell/MyRewardsBannerOffersScrollTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsBannerOffersScrollTableViewCell/MyRewardsBannerOffersScrollTableViewCell.xib
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
89db082
...
...
@@ -7,7 +7,7 @@
<key>
Pods-SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
0
</integer>
<integer>
1
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
89db082
...
...
@@ -7,7 +7,7 @@
<key>
SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
1
</integer>
<integer>
0
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
89db082
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsBannerOffersScrollTableViewCell/MyRewardsBannerOffersScrollTableViewCell.swift
View file @
89db082
...
...
@@ -36,6 +36,35 @@ import UIKit
// Register XIBs for collection view cells
collectionView
.
register
(
UINib
(
nibName
:
"MyRewardsBannerOfferCollectionViewCell"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
)),
forCellWithReuseIdentifier
:
"MyRewardsBannerOfferCollectionViewCell"
)
// Fix background colors
collectionView
.
backgroundColor
=
UIColor
.
clear
self
.
backgroundColor
=
UIColor
.
clear
self
.
contentView
.
backgroundColor
=
UIColor
.
clear
// Remove content insets and gaps
collectionView
.
contentInset
=
UIEdgeInsets
.
zero
collectionView
.
scrollIndicatorInsets
=
UIEdgeInsets
.
zero
if
#available(iOS 11.0, *)
{
collectionView
.
contentInsetAdjustmentBehavior
=
.
never
}
// Configure collection view layout
if
let
layout
=
collectionView
.
collectionViewLayout
as?
UICollectionViewFlowLayout
{
layout
.
scrollDirection
=
.
horizontal
layout
.
minimumLineSpacing
=
0
layout
.
minimumInteritemSpacing
=
0
layout
.
sectionInset
=
UIEdgeInsets
.
zero
}
// Enable paging for smooth banner scrolling
collectionView
.
isPagingEnabled
=
true
collectionView
.
showsHorizontalScrollIndicator
=
false
// Set delegates
collectionView
.
delegate
=
self
collectionView
.
dataSource
=
self
}
public
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
...
...
@@ -50,7 +79,8 @@ import UIKit
}
}
extension
MyRewardsBannerOffersScrollTableViewCell
:
UICollectionViewDataSource
,
UICollectionViewDelegate
{
extension
MyRewardsBannerOffersScrollTableViewCell
:
UICollectionViewDataSource
,
UICollectionViewDelegate
,
UICollectionViewDelegateFlowLayout
{
public
func
numberOfSections
(
in
collectionView
:
UICollectionView
)
->
Int
{
return
1
...
...
@@ -72,15 +102,24 @@ extension MyRewardsBannerOffersScrollTableViewCell: UICollectionViewDataSource,U
public
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
// TODO: open offer
}
// MARK: - UICollectionViewDelegateFlowLayout
public
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
sizeForItemAt
indexPath
:
IndexPath
)
->
CGSize
{
let
screenWidth
=
UIScreen
.
main
.
bounds
.
width
return
CGSize
(
width
:
screenWidth
,
height
:
348
)
}
// Distance Between Item Cells
public
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
minimumLineSpacingForSectionAt
section
:
Int
)
->
CGFloat
{
return
0
}
// // Distance Between Item Cells
// func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
// return 5
// }
//
// // Cell Margin
// func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
// return UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0)
// }
public
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
minimumInteritemSpacingForSectionAt
section
:
Int
)
->
CGFloat
{
return
0
}
// Cell Margin
public
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
insetForSectionAt
section
:
Int
)
->
UIEdgeInsets
{
return
UIEdgeInsets
.
zero
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsBannerOffersScrollTableViewCell/MyRewardsBannerOffersScrollTableViewCell.xib
View file @
89db082
...
...
@@ -120,7 +120,7 @@
<constraint
firstAttribute=
"trailing"
secondItem=
"JTs-J5-DO2"
secondAttribute=
"trailing"
constant=
"24"
id=
"Rdi-FK-2Ft"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"I7z-Fz-SNP"
secondAttribute=
"trailing"
id=
"avB-Gc-ttI"
/>
<constraint
firstItem=
"I7z-Fz-SNP"
firstAttribute=
"leading"
secondItem=
"VzF-dQ-3Wa"
secondAttribute=
"leading"
id=
"pTY-7d-s1S"
/>
<constraint
firstItem=
"I7z-Fz-SNP"
firstAttribute=
"top"
secondItem=
"JTs-J5-DO2"
secondAttribute=
"bottom"
constant=
"
2
0"
id=
"vJF-jy-p83"
/>
<constraint
firstItem=
"I7z-Fz-SNP"
firstAttribute=
"top"
secondItem=
"JTs-J5-DO2"
secondAttribute=
"bottom"
constant=
"
1
0"
id=
"vJF-jy-p83"
/>
</constraints>
</view>
</subviews>
...
...
Please
register
or
login
to post a comment