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
2023-10-20 18:09:12 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
655f4043aead8c5f301cd038ba45da39a958dcc3
655f4043
1 parent
0884e778
add UnifiedCouponsVC empty view
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
655f404
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
655f404
...
...
@@ -3180,13 +3180,13 @@
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
lineBreakMode=
"tailTruncation"
numberOfLines=
"4"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"jeN-eT-NTP"
>
<rect
key=
"frame"
x=
"292.5"
y=
"25
.5"
width=
"81.5"
height=
"14
"
/>
<rect
key=
"frame"
x=
"292.5"
y=
"25
"
width=
"81.5"
height=
"15
"
/>
<fontDescription
key=
"fontDescription"
name=
"PeridotPE-Regular"
family=
"Peridot PE"
pointSize=
"12"
/>
<color
key=
"textColor"
red=
"0.12941176469999999"
green=
"0.12941176469999999"
blue=
"0.12941176469999999"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"wCr-ft-C3l"
>
<rect
key=
"frame"
x=
"119"
y=
"3
5.5"
width=
"255"
height=
"14
"
/>
<rect
key=
"frame"
x=
"119"
y=
"3
4.5"
width=
"255"
height=
"15
"
/>
<fontDescription
key=
"fontDescription"
name=
"PeridotPE-Regular"
family=
"Peridot PE"
pointSize=
"12"
/>
<color
key=
"textColor"
red=
"0.12941176469999999"
green=
"0.12941176469999999"
blue=
"0.12941176469999999"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -3241,16 +3241,37 @@
<outlet
property=
"delegate"
destination=
"3uV-Le-crf"
id=
"3Mq-HR-Udb"
/>
</connections>
</tableView>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"U5I-GH-geX"
>
<rect
key=
"frame"
x=
"20"
y=
"0.0"
width=
"374"
height=
"0.0"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"VW1-eq-kSh"
>
<rect
key=
"frame"
x=
"0.0"
y=
"30"
width=
"374"
height=
"18.5"
/>
<fontDescription
key=
"fontDescription"
name=
"PeridotPE-Regular"
family=
"Peridot PE"
pointSize=
"15"
/>
<color
key=
"textColor"
red=
"0.12941176469999999"
green=
"0.12941176469999999"
blue=
"0.12941176469999999"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"VW1-eq-kSh"
secondAttribute=
"trailing"
id=
"CUA-sb-5E4"
/>
<constraint
firstAttribute=
"height"
id=
"Ooe-1Z-EJ8"
/>
<constraint
firstItem=
"VW1-eq-kSh"
firstAttribute=
"top"
secondItem=
"U5I-GH-geX"
secondAttribute=
"top"
constant=
"30"
id=
"WZg-A7-B3I"
/>
<constraint
firstItem=
"VW1-eq-kSh"
firstAttribute=
"leading"
secondItem=
"U5I-GH-geX"
secondAttribute=
"leading"
id=
"WjY-2G-56p"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
red=
"0.94901960780000005"
green=
"0.94901960780000005"
blue=
"0.95294117649999999"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstItem=
"U5I-GH-geX"
firstAttribute=
"top"
secondItem=
"BQW-dX-NwZ"
secondAttribute=
"top"
id=
"0Sl-He-idh"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"YVv-xm-y2W"
secondAttribute=
"bottom"
id=
"2Sd-z8-rwY"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"YVv-xm-y2W"
secondAttribute=
"trailing"
id=
"38N-7Z-jr0"
/>
<constraint
firstItem=
"YVv-xm-y2W"
firstAttribute=
"leading"
secondItem=
"BQW-dX-NwZ"
secondAttribute=
"leading"
id=
"93P-If-3rc"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"QKV-Lk-E2a"
secondAttribute=
"bottom"
id=
"IeT-AJ-BlK"
/>
<constraint
firstItem=
"QKV-Lk-E2a"
firstAttribute=
"top"
secondItem=
"BQW-dX-NwZ"
secondAttribute=
"top"
id=
"TRn-cU-wHn"
/>
<constraint
firstItem=
"U5I-GH-geX"
firstAttribute=
"leading"
secondItem=
"BQW-dX-NwZ"
secondAttribute=
"leading"
constant=
"20"
id=
"U9E-ku-HqF"
/>
<constraint
firstItem=
"YVv-xm-y2W"
firstAttribute=
"top"
secondItem=
"BQW-dX-NwZ"
secondAttribute=
"top"
constant=
"2"
id=
"XeB-29-8xb"
/>
<constraint
firstItem=
"QKV-Lk-E2a"
firstAttribute=
"leading"
secondItem=
"BQW-dX-NwZ"
secondAttribute=
"leading"
id=
"ZP8-kd-9RI"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"U5I-GH-geX"
secondAttribute=
"trailing"
constant=
"20"
id=
"ex6-de-ech"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"QKV-Lk-E2a"
secondAttribute=
"trailing"
id=
"tzT-5O-w7Q"
/>
</constraints>
<variation
key=
"default"
>
...
...
@@ -3271,6 +3292,9 @@
</view>
<connections>
<outlet
property=
"backgroundImage"
destination=
"QKV-Lk-E2a"
id=
"sWD-ra-Ek8"
/>
<outlet
property=
"emptyLabel"
destination=
"VW1-eq-kSh"
id=
"Lva-nM-uXu"
/>
<outlet
property=
"emptyView"
destination=
"U5I-GH-geX"
id=
"lhU-3z-yKl"
/>
<outlet
property=
"emptyViewHeight"
destination=
"Ooe-1Z-EJ8"
id=
"SRF-jF-7to"
/>
<outlet
property=
"tableView"
destination=
"YVv-xm-y2W"
id=
"kle-or-Ckg"
/>
</connections>
</viewController>
...
...
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponsViewController.swift
View file @
655f404
...
...
@@ -12,6 +12,9 @@ import SwiftEventBus
@objc
public
class
UnifiedCouponsViewController
:
UIViewController
{
@IBOutlet
weak
var
backgroundImage
:
UIImageView
!
@IBOutlet
weak
var
tableView
:
UITableView
!
@IBOutlet
weak
var
emptyView
:
UIView
!
@IBOutlet
weak
var
emptyViewHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
emptyLabel
:
UILabel
!
public
var
unifiedCoupons
:
Array
<
swiftApi
.
UnifiedCouponModel
>
=
[]
...
...
@@ -25,6 +28,14 @@ import SwiftEventBus
DispatchQueue
.
main
.
async
{
self
.
unifiedCoupons
=
swiftApi
()
.
getUnifiedCouponList
()
self
.
tableView
.
reloadData
()
if
(
self
.
unifiedCoupons
.
count
==
0
)
{
self
.
emptyView
.
isHidden
=
false
self
.
emptyViewHeight
.
constant
=
self
.
emptyView
.
intrinsicContentSize
.
height
}
else
{
self
.
emptyView
.
isHidden
=
true
self
.
emptyViewHeight
.
constant
=
0
}
}
}
...
...
@@ -40,6 +51,8 @@ import SwiftEventBus
// tableView.layer.cornerRadius = 30
// tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
tableView
.
contentInset
.
top
=
30
emptyLabel
.
text
=
"Αυτήν τη στιγμή δεν έχεις κάποιο ενεργό κουπόνι. Στην ενότητα FOR YOU μπορείς να βρεις κουπόνια αποκλειστικά για σένα!"
}
public
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
...
@@ -50,6 +63,14 @@ import SwiftEventBus
self
.
unifiedCoupons
=
swiftApi
()
.
getUnifiedCouponList
()
self
.
tableView
.
reloadData
()
if
(
self
.
unifiedCoupons
.
count
==
0
)
{
self
.
emptyView
.
isHidden
=
false
self
.
emptyViewHeight
.
constant
=
self
.
emptyView
.
intrinsicContentSize
.
height
}
else
{
self
.
emptyView
.
isHidden
=
true
self
.
emptyViewHeight
.
constant
=
0
}
self
.
navigationController
?
.
hideHairline
()
}
...
...
Please
register
or
login
to post a comment