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-21 12:16:21 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1dd9fed13b6272c33f2fbda9170c7a2ef1fbf71b
1dd9fed1
1 parent
012ee3dd
UnifiedCouponBarcodeViewController ui fixes
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
6 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponBCFooterTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponBCHeaderTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
1dd9fed
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
1dd9fed
This diff is collapsed. Click to expand it.
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponBCFooterTableViewCell.swift
View file @
1dd9fed
...
...
@@ -25,20 +25,22 @@ import AVFoundation
termsTextView
.
delegate
=
self
mapButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PeridotPE-Bold"
,
size
:
17
)
mapButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PeridotPE-
S
Bold"
,
size
:
17
)
mapButton
.
setTitle
(
"Δες τα supermarket"
,
for
:
.
normal
)
mapButton
.
setTitleColor
(
UIColor
(
red
:
1.00
,
green
:
1.00
,
blue
:
1.00
,
alpha
:
1.00
),
for
:
.
normal
)
mapButton
.
backgroundColor
=
UIColor
(
red
:
0.05
,
green
:
0.65
,
blue
:
0.00
,
alpha
:
1.00
)
mapButton
.
layer
.
cornerRadius
=
15.0
mapButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
mapButton
.
intrinsicContentSize
.
width
,
height
:
50
)
mapButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
0
,
left
:
25
,
bottom
:
0
,
right
:
25
)
mapButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
260
,
height
:
55
)
// mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 50)
// mapButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25)
cancelButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PeridotPE-Bold"
,
size
:
17
)
cancelButton
.
setTitle
(
"Ακ
ύρωση ενιαίου κουπονιού"
,
for
:
.
normal
)
cancelButton
.
setTitle
(
"Ακ
υρωση κουπονιού"
,
for
:
.
normal
)
// Ακύρωση ενιαίου κουπονιού
cancelButton
.
setTitleColor
(
UIColor
(
red
:
0.05
,
green
:
0.65
,
blue
:
0.00
,
alpha
:
1.00
),
for
:
.
normal
)
cancelButton
.
layer
.
cornerRadius
=
15.0
cancelButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
cancelButton
.
intrinsicContentSize
.
width
,
height
:
50
)
cancelButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
0
,
left
:
25
,
bottom
:
0
,
right
:
25
)
cancelButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
260
,
height
:
55
)
// cancelButton.frame = CGRect(x: 0.0, y: 0.0, width: cancelButton.intrinsicContentSize.width, height: 50)
// cancelButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25)
cancelButton
.
backgroundColor
=
.
clear
cancelButton
.
layer
.
borderWidth
=
2
cancelButton
.
layer
.
borderColor
=
UIColor
(
red
:
0.05
,
green
:
0.65
,
blue
:
0.00
,
alpha
:
1.00
)
.
cgColor
...
...
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponBCHeaderTableViewCell.swift
View file @
1dd9fed
...
...
@@ -26,6 +26,8 @@ import AVFoundation
@IBOutlet
weak
var
barcodeLabelHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
showBarcodeButton
:
UIButton
!
@IBOutlet
weak
var
expirationLabel
:
UILabel
!
@IBOutlet
weak
var
expirationLabelHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
expirationLabelTopSpace
:
NSLayoutConstraint
!
@IBOutlet
weak
var
borderViewHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
borderView2Height
:
NSLayoutConstraint
!
@IBOutlet
weak
var
border1TopSpace
:
NSLayoutConstraint
!
...
...
@@ -35,6 +37,9 @@ import AVFoundation
@IBOutlet
weak
var
showBarcodeButtonHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
showBarcodeButtonTopSpace
:
NSLayoutConstraint
!
@IBOutlet
weak
var
showCouponsButton
:
UIButton
!
@IBOutlet
weak
var
topExpirationView
:
UIView
!
@IBOutlet
weak
var
topExpirationLabel
:
UILabel
!
@IBOutlet
weak
var
barcodeTitleLabel
:
UILabel
!
let
uiscreen
:
CGRect
=
UIScreen
.
main
.
bounds
...
...
@@ -55,6 +60,23 @@ import AVFoundation
couponImageHeight
.
constant
=
222
// 255 //230 // 253 // self.uiscreen.height * 0.25
nameLabel
.
text
=
"Εκπτωτικό κουπόνι COSMOTE SUPERMARKET DEALS!"
topExpirationView
.
backgroundColor
=
UIColor
(
rgb
:
0xB8E0EF
)
topExpirationView
.
layer
.
cornerRadius
=
13.0
topExpirationLabel
.
font
=
UIFont
(
name
:
"PeridotPE-Bold"
,
size
:
13
)
topExpirationLabel
.
textColor
=
UIColor
(
rgb
:
0x004B87
)
// Hide bottom expirationLabel ==>
expirationLabel
.
isHidden
=
true
expirationLabelHeight
.
constant
=
CGFloat
(
0
)
expirationLabelTopSpace
.
constant
=
CGFloat
(
0
)
// ===
barcodeTitleLabel
.
text
=
"barcode κουπονιού"
barcodeTitleLabel
.
font
=
UIFont
(
name
:
"PeridotPE-Bold"
,
size
:
16
)
barcodeTitleLabel
.
textColor
=
UIColor
(
rgb
:
0x212121
)
discriptionLabel
.
text
=
"Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών."
merchantDescrTextView
.
text
=
""
...
...
@@ -199,8 +221,11 @@ import AVFoundation
// if let earliestExpiration = coupon?._coupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) {
if
let
latestExpiration
=
coupon
?
.
_coupons
.
max
(
by
:
{
(
$0
.
expiration
??
""
)
<
(
$1
.
expiration
??
""
)
})
{
expirationLabel
.
text
=
"Το κουπόνι ισχύει έως "
+
(
latestExpiration
.
expiration
??
""
)
topExpirationLabel
.
text
=
"Ισχύει έως "
+
(
latestExpiration
.
expiration
??
""
)
topExpirationLabel
.
frame
.
size
.
width
=
topExpirationLabel
.
intrinsicContentSize
.
width
}
else
{
expirationLabel
.
text
=
""
topExpirationLabel
.
text
=
""
}
toggleCoupons
(
couponsVisible
:
couponsVisible
)
...
...
Please
register
or
login
to post a comment