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
2024-10-22 17:06:45 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
90190d0d6ec57e194d3d67784432500cd378123e
90190d0d
1 parent
5d644e8b
fix PopupMerchantsViewController dynamic height
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
16 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/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/MerchantTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/NumberPopupViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/PopupMerchantsViewController.swift
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
90190d0
...
...
@@ -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 @
90190d0
...
...
@@ -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 @
90190d0
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
90190d0
...
...
@@ -6398,7 +6398,7 @@
<constraint
firstAttribute=
"bottom"
secondItem=
"kH9-FC-wgF"
secondAttribute=
"bottom"
id=
"cNA-DV-1fn"
/>
</constraints>
</view>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
ambiguous=
"YES"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"none"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"-1"
estimatedSectionHeaderHeight=
"-1"
sectionFooterHeight=
"-1"
estimatedSectionFooterHeight=
"-1"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vet-Po-Bmf"
customClass=
"DynamicSizeTableView"
customModule=
"SwiftWarplyFramework"
customModuleProvider=
"target"
>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
ambiguous=
"YES"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"none"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"-1"
estimatedSectionHeaderHeight=
"-1"
sectionFooterHeight=
"-1"
estimatedSectionFooterHeight=
"-1"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vet-Po-Bmf"
customClass=
"DynamicSize
Merchants
TableView"
customModule=
"SwiftWarplyFramework"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"50"
width=
"414"
height=
"250"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<color
key=
"separatorColor"
red=
"0.68235294120000001"
green=
"0.68235294120000001"
blue=
"0.68235294120000001"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedRGB"
/>
...
...
@@ -6406,10 +6406,10 @@
<color
key=
"sectionIndexBackgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
reuseIdentifier=
"MerchantTableViewCellId"
id=
"fym-iB-q6x"
customClass=
"MerchantTableViewCell"
customModule=
"SwiftWarplyFramework"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"50"
width=
"414"
height=
"
56
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"50"
width=
"414"
height=
"
88
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"fym-iB-q6x"
id=
"jOZ-KL-eu1"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"
56
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"
88
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"TQn-b5-U6q"
>
...
...
@@ -6479,7 +6479,7 @@
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"TQn-b5-U6q"
secondAttribute=
"bottom"
id=
"DlG-eC-Miw"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"TQn-b5-U6q"
secondAttribute=
"bottom"
constant=
"32"
id=
"DlG-eC-Miw"
/>
<constraint
firstItem=
"TQn-b5-U6q"
firstAttribute=
"top"
secondItem=
"jOZ-KL-eu1"
secondAttribute=
"top"
id=
"Znl-Kn-l4H"
/>
<constraint
firstItem=
"TQn-b5-U6q"
firstAttribute=
"leading"
secondItem=
"jOZ-KL-eu1"
secondAttribute=
"leading"
constant=
"18"
id=
"dsI-sU-JVJ"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"TQn-b5-U6q"
secondAttribute=
"trailing"
constant=
"18"
id=
"prx-5Z-TVo"
/>
...
...
@@ -6496,7 +6496,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
reuseIdentifier=
"PopupMerchantsFooterTableViewCellId"
id=
"f5f-VE-AbI"
customClass=
"PopupMerchantsFooterTableViewCell"
customModule=
"SwiftWarplyFramework"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"1
06
"
width=
"414"
height=
"50"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"1
38
"
width=
"414"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"f5f-VE-AbI"
id=
"YhO-v9-8eO"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"50"
/>
...
...
@@ -6549,7 +6549,6 @@
<constraint
firstAttribute=
"bottom"
secondItem=
"vet-Po-Bmf"
secondAttribute=
"bottom"
id=
"B03-fG-aC2"
/>
<constraint
firstItem=
"vet-Po-Bmf"
firstAttribute=
"leading"
secondItem=
"cSR-WK-qb0"
secondAttribute=
"leading"
id=
"F8e-cg-wdq"
/>
<constraint
firstItem=
"MNf-7L-OWL"
firstAttribute=
"top"
secondItem=
"cSR-WK-qb0"
secondAttribute=
"top"
constant=
"15"
id=
"N8O-in-CB3"
/>
<constraint
firstAttribute=
"height"
relation=
"greaterThanOrEqual"
constant=
"320"
id=
"c1w-Ub-vF7"
/>
<constraint
firstItem=
"vet-Po-Bmf"
firstAttribute=
"top"
secondItem=
"MNf-7L-OWL"
secondAttribute=
"bottom"
constant=
"15"
id=
"hl9-87-bJ7"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"vet-Po-Bmf"
secondAttribute=
"trailing"
id=
"lgN-8i-jJk"
/>
</constraints>
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MerchantTableViewCell.swift
View file @
90190d0
...
...
@@ -66,12 +66,12 @@ class MerchantTableViewCell: UITableViewCell {
// Configure the view for the selected state
}
public
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
//set the values for top,left,bottom,right margins
let
margins
=
UIEdgeInsets
(
top
:
0
,
left
:
0
,
bottom
:
32
,
right
:
0
)
contentView
.
frame
=
contentView
.
frame
.
inset
(
by
:
margins
)
}
//
public override func layoutSubviews() {
//
super.layoutSubviews()
//
//set the values for top,left,bottom,right margins
//
let margins = UIEdgeInsets(top: 0, left: 0, bottom: 32, right: 0)
//
contentView.frame = contentView.frame.inset(by: margins)
//
}
func
configureCell
(
shop
:
swiftApi
.
ShopAvailabilityItemModel
,
buttonTitle
:
String
,
iconImage
:
String
?,
showEshops
:
Bool
?)
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/NumberPopupViewController.swift
View file @
90190d0
...
...
@@ -188,8 +188,12 @@ extension NumberPopupViewController: UITableViewDelegate, UITableViewDataSource{
}
}
// override public var intrinsicContentSize: CGSize {
// return contentSize
// }
override
public
var
intrinsicContentSize
:
CGSize
{
return
contentSize
return
CGSize
(
width
:
UIView
.
noIntrinsicMetric
,
height
:
contentSize
.
height
+
contentInset
.
top
+
contentInset
.
bottom
)
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/PopupMerchantsViewController.swift
View file @
90190d0
...
...
@@ -11,7 +11,7 @@ class PopupMerchantsViewController: UIViewController {
@IBOutlet
weak
var
popupView
:
UIView
!
@IBOutlet
weak
var
headerLabel
:
UILabel
!
@IBOutlet
weak
var
closeButton
:
UIButton
!
@IBOutlet
weak
var
tableView
:
DynamicSizeTableView
!
@IBOutlet
weak
var
tableView
:
DynamicSize
Merchants
TableView
!
public
var
availableShopsList
:
Array
<
swiftApi
.
ShopAvailabilityItemModel
>
=
[]
// public var coupon: swiftApi.CouponItemModel?
...
...
@@ -45,6 +45,8 @@ class PopupMerchantsViewController: UIViewController {
self
.
headerLabel
.
text
=
self
.
headerText
headerLabel
.
font
=
UIFont
(
name
:
"BTCosmo-Bold"
,
size
:
18
)
headerLabel
.
textColor
=
UIColor
(
rgb
:
0x000000
)
// setupFooterView()
}
// MARK: - Functions
...
...
@@ -60,6 +62,38 @@ class PopupMerchantsViewController: UIViewController {
availableShopsList
.
append
(
tempShop2
)
}
// private func setupFooterView() {
// // Create a footer view container
// let footerView = UIView()
// footerView.backgroundColor = .clear
//
// // Create a label for the footer
// let footerLabel = UILabel()
// footerLabel.text = "Η διαθεσιμότητα ενδέχεται να διαφέρει ανάλογα με την τοποθεσία."
// footerLabel.textAlignment = .center
// footerLabel.font = UIFont(name: "PeridotPE-Regular", size: 13)
// footerLabel.textColor = UIColor(rgb: 0x000000)
// footerLabel.numberOfLines = 0 // Allow for multiline text
//
// // Add label to the footer view
// footerView.addSubview(footerLabel)
// footerLabel.translatesAutoresizingMaskIntoConstraints = false
//
// // Set constraints for the label inside the footer view
// NSLayoutConstraint.activate([
// footerLabel.leadingAnchor.constraint(equalTo: footerView.leadingAnchor, constant: 16),
// footerLabel.trailingAnchor.constraint(equalTo: footerView.trailingAnchor, constant: -16),
// footerLabel.topAnchor.constraint(equalTo: footerView.topAnchor, constant: 10),
// footerLabel.bottomAnchor.constraint(equalTo: footerView.bottomAnchor, constant: -10)
// ])
//
// // Set the footer view's frame size to fit the content
// footerView.frame = CGRect(x: 0, y: 0, width: tableView.frame.width, height: 50)
//
// // Assign the footer view to the table view's footer
// tableView.tableFooterView = footerView
// }
// MARK: - UIButton Actions
@IBAction
func
closeButtonAction
(
_
sender
:
Any
)
{
self
.
dismiss
(
animated
:
true
,
completion
:
{})
...
...
@@ -155,3 +189,23 @@ extension PopupMerchantsViewController: MerchantTableViewCellDelegate {
}
}
// Class for dynamic height table view
@objc
public
class
DynamicSizeMerchantsTableView
:
UITableView
{
override
public
func
layoutSubviews
()
{
super
.
layoutSubviews
()
if
bounds
.
size
!=
intrinsicContentSize
{
invalidateIntrinsicContentSize
()
}
}
// override public var intrinsicContentSize: CGSize {
// return contentSize
// }
override
public
var
intrinsicContentSize
:
CGSize
{
return
CGSize
(
width
:
UIView
.
noIntrinsicMetric
,
height
:
contentSize
.
height
+
contentInset
.
top
+
contentInset
.
bottom
+
30
)
}
}
...
...
Please
register
or
login
to post a comment