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
2022-04-28 12:20:27 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
73c0b937a8289a017f83bb9847cf8c6c3adadbed
73c0b937
1 parent
88abd9b7
CouponBarcodeView fixes
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/CouponBarcodeView.swift
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
73c0b93
No preview for this file type
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/CouponBarcodeView.swift
View file @
73c0b93
...
...
@@ -56,7 +56,7 @@ extension CouponBarcodeView {
static
func
convertDateFormat
(
inputDate
:
String
)
->
String
{
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
dateFormat
=
"yyyy-MM-dd hh:mm"
dateFormatter
.
dateFormat
=
"yyyy-MM-dd hh:mm
:ss
"
if
let
date
=
dateFormatter
.
date
(
from
:
inputDate
)
{
dateFormatter
.
dateFormat
=
"dd/MM/yyyy"
let
resultString
=
dateFormatter
.
string
(
from
:
date
)
...
...
@@ -97,6 +97,8 @@ extension CouponBarcodeView {
var
body
:
some
View
{
let
couponData
=
coupon
[
"coupon_data"
]
as?
[
String
:
Any
]
??
[
""
:
""
]
GeometryReader
{
geometry
in
ScrollView
(
showsIndicators
:
false
)
{
VStack
(
alignment
:
.
leading
)
{
...
...
@@ -111,6 +113,7 @@ extension CouponBarcodeView {
.
multilineTextAlignment
(
.
leading
)
.
padding
(
.
horizontal
)
.
padding
(
.
top
,
self
.
uiscreen
.
height
*
0.04
)
.
frame
(
maxHeight
:
.
infinity
)
Text
(
coupon
[
"short_description"
]
as?
String
??
""
)
.
fontWeight
(
.
regular
)
...
...
@@ -131,7 +134,7 @@ extension CouponBarcodeView {
VStack
(
alignment
:
.
center
)
{
VStack
{
Text
(
coupon
[
"coupon"
]
as?
String
??
""
)
Text
(
coupon
Data
[
"coupon"
]
as?
String
??
""
)
.
fontWeight
(
.
bold
)
.
font
(
.
system
(
size
:
27
))
.
foregroundColor
(
Color
(
red
:
0.2549019607843137
,
green
:
0.3333333333333333
,
blue
:
0.39215686274509803
))
...
...
@@ -146,7 +149,7 @@ extension CouponBarcodeView {
}
.
frame
(
maxWidth
:
.
infinity
)
if
(
CharacterSet
.
decimalDigits
.
isSuperset
(
of
:
CharacterSet
(
charactersIn
:
coupon
[
"coupon"
]
as?
String
??
""
)))
{
if
(
CharacterSet
.
decimalDigits
.
isSuperset
(
of
:
CharacterSet
(
charactersIn
:
coupon
Data
[
"coupon"
]
as?
String
??
""
)))
{
VStack
(
alignment
:
.
center
)
{
VStack
{}
.
frame
(
height
:
1
)
...
...
@@ -194,7 +197,7 @@ extension CouponBarcodeView {
// .aspectRatio(contentMode: .fit)
// .frame(width: self.uiscreen.width, height: self.uiscreen.height * 0.1)
Text
(
coupon
[
"coupon"
]
as?
String
??
""
)
Text
(
coupon
Data
[
"coupon"
]
as?
String
??
""
)
.
fontWeight
(
.
regular
)
.
font
(
.
system
(
size
:
22
))
.
foregroundColor
(
Color
(
red
:
0.2549019607843137
,
green
:
0.3333333333333333
,
blue
:
0.39215686274509803
))
...
...
@@ -215,7 +218,7 @@ extension CouponBarcodeView {
Text
(
"Το κουπόνι ισχύει έως "
+
CouponBarcodeView
.
couponContainer
.
convertDateFormat
(
inputDate
:
coupon
[
"expiration"
]
as?
String
??
""
))
Text
(
"Το κουπόνι ισχύει έως "
+
CouponBarcodeView
.
couponContainer
.
convertDateFormat
(
inputDate
:
coupon
Data
[
"expiration"
]
as?
String
??
""
))
.
fontWeight
(
.
medium
)
.
font
(
.
system
(
size
:
14
))
.
foregroundColor
(
Color
(
red
:
0.2549019607843137
,
green
:
0.3333333333333333
,
blue
:
0.39215686274509803
))
...
...
@@ -296,7 +299,7 @@ extension CouponBarcodeView {
}
.
frame
(
width
:
self
.
uiscreen
.
width
)
.
frame
(
minHeight
:
geometry
.
size
.
height
)
//
.frame(minHeight: geometry.size.height)
.
padding
(
.
bottom
,
self
.
uiscreen
.
height
*
0.03
)
}
.
frame
(
width
:
self
.
uiscreen
.
width
)
...
...
Please
register
or
login
to post a comment