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-07-13 14:20:12 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9bf07cc23d3598065d0175042a376c6eb6920c78
9bf07cc2
1 parent
cd1f994c
add native couponset flow at gfyVC, mfyVC
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
View file @
9bf07cc
...
...
@@ -84,6 +84,25 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
}
public
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
(
campaigns
[
indexPath
.
row
]
.
_campaign_type
==
"coupon"
)
{
let
couponsetUuid
=
campaigns
[
indexPath
.
row
]
.
_couponset
if
(
couponsetUuid
!=
""
)
{
let
couponsetsList
=
swiftApi
()
.
getCouponSetList
()
for
item
in
couponsetsList
{
if
(
item
.
uuid
==
couponsetUuid
)
{
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"CouponViewController"
)
as!
SwiftWarplyFramework
.
CouponViewController
vc
.
couponset
=
item
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
;
}
}
}
}
else
{
if
(
campaigns
[
indexPath
.
row
]
.
session_uuid
!=
nil
&&
campaigns
[
indexPath
.
row
]
.
session_uuid
!=
""
)
{
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"CampaignViewController"
)
as!
SwiftWarplyFramework
.
CampaignViewController
...
...
@@ -138,5 +157,6 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
SwiftEventBus
.
post
(
"seasonal"
,
sender
:
seasonalEvent
)
}
}
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
View file @
9bf07cc
...
...
@@ -73,7 +73,25 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
}
public
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
(
campaigns
[
indexPath
.
row
]
.
_campaign_type
==
"coupon"
)
{
let
couponsetUuid
=
campaigns
[
indexPath
.
row
]
.
_couponset
if
(
couponsetUuid
!=
""
)
{
let
couponsetsList
=
swiftApi
()
.
getCouponSetList
()
for
item
in
couponsetsList
{
if
(
item
.
uuid
==
couponsetUuid
)
{
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"CouponViewController"
)
as!
SwiftWarplyFramework
.
CouponViewController
vc
.
couponset
=
item
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
;
}
}
}
}
else
{
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"CampaignViewController"
)
as!
SwiftWarplyFramework
.
CampaignViewController
let
url
=
swiftApi
()
.
constructCampaignUrl
(
campaigns
[
indexPath
.
row
])
...
...
@@ -81,5 +99,6 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
vc
.
campaignUrl
=
url
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
}
...
...
Please
register
or
login
to post a comment