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-29 18:10:55 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
77606081ae0486694fffebb0132ed385e0fb26ca
77606081
1 parent
09dbda98
update allGifts
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/AllGiftsView.swift
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
7760608
No preview for this file type
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/AllGiftsView.swift
View file @
7760608
...
...
@@ -71,16 +71,18 @@ extension AllGiftsView {
struct
giftItemView
:
View
{
var
item
:
NSDictionary
var
item
:
swiftApi
.
CouponItemModel
var
parentView
:
UIView
var
uiscreen
=
UIScreen
.
main
.
bounds
var
body
:
some
View
{
let
couponSetData
=
item
.
couponset_data
Button
{
// GiftItem Action
let
instanceOfMy
Api
=
My
Api
()
let
couponBarcodeViewController
=
instanceOfMy
Api
.
openCouponBarcode
(
parentView
,
coupon
:
item
as!
[
String
:
Any
])
!
let
instanceOfMy
SwiftApi
=
swift
Api
()
let
couponBarcodeViewController
=
instanceOfMy
SwiftApi
.
openCouponBarcode
(
parent
:
parentView
,
coupon
:
item
)
couponBarcodeViewController
.
view
.
tag
=
7
// addChild(couponsViewController)
couponBarcodeViewController
.
view
.
frame
=
parentView
.
frame
...
...
@@ -89,10 +91,10 @@ extension AllGiftsView {
}
label
:
{
HStack
(
alignment
:
.
center
,
spacing
:
0.0
)
{
ImageView
(
withURL
:
item
[
"img_preview"
]
as?
String
??
""
,
width
:
self
.
uiscreen
.
width
*
0.5
,
isFill
:
true
)
ImageView
(
withURL
:
couponSetData
?
.
img_preview
??
""
,
width
:
self
.
uiscreen
.
width
*
0.5
,
isFill
:
true
)
VStack
(
alignment
:
.
leading
,
spacing
:
5.0
)
{
Text
(
item
[
"name"
]
as?
String
??
""
)
Text
(
couponSetData
?
.
name
??
""
)
.
fontWeight
(
.
bold
)
.
font
(
.
system
(
size
:
16
))
.
foregroundColor
(
Color
(
red
:
0.2549019607843137
,
green
:
0.3333333333333333
,
blue
:
0.39215686274509803
))
...
...
@@ -100,7 +102,7 @@ extension AllGiftsView {
.
padding
([
.
top
,
.
horizontal
],
15
)
.
background
(
Color
.
white
)
Text
(
item
[
"short_description"
]
as?
String
??
""
)
Text
(
couponSetData
?
.
short_description
??
""
)
.
fontWeight
(
.
regular
)
.
font
(
.
system
(
size
:
16
))
.
foregroundColor
(
Color
(
red
:
0.2549019607843137
,
green
:
0.3333333333333333
,
blue
:
0.39215686274509803
))
...
...
@@ -123,7 +125,7 @@ extension AllGiftsView {
}
struct
couponsContainer
:
View
{
@State
var
coupons
:
Array
<
NSDictionary
>
=
[]
@State
var
coupons
:
Array
<
swiftApi
.
CouponItemModel
>
=
[]
@State
var
parentView
:
UIView
var
uiscreen
=
UIScreen
.
main
.
bounds
...
...
@@ -148,10 +150,19 @@ extension AllGiftsView {
struct
AllGiftsView
:
View
{
var
parentView
:
UIView
var
coupons
:
Array
<
NSDictionary
>
=
DataModel
()
.
getData
var
coupons
:
Array
<
swiftApi
.
CouponItemModel
>
=
[]
var
uiscreen
=
UIScreen
.
main
.
bounds
init
(
parentView
:
UIView
)
{
//initializer method
let
instanceOfMySwiftApi
=
swiftApi
()
let
couponsData
=
instanceOfMySwiftApi
.
getCoupons
()
self
.
coupons
=
couponsData
self
.
parentView
=
parentView
}
func
goBack
(){
for
subview
in
parentView
.
subviews
{
if
(
subview
.
tag
==
8
)
{
...
...
Please
register
or
login
to post a comment