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-11-01 12:36:20 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2d12eaaabf3f13652e9bc72367987f3d5208f512
2d12eaaa
1 parent
429855f7
CampaignViewController optimizations
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
View file @
2d12eaa
...
...
@@ -798,15 +798,20 @@ var timer2: DispatchSourceTimer?
SwiftEventBus
.
post
(
"refresh_vouchers"
)
// SwiftEventBus.post("open_my_rewards")
swiftApi
()
.
getUnifiedCouponsDeals
{
unifiedCoupons
in
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"UnifiedCouponsViewController"
)
as!
SwiftWarplyFramework
.
UnifiedCouponsViewController
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
failureCallback
:
{
errorCode
in
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"UnifiedCouponsViewController"
)
as!
SwiftWarplyFramework
.
UnifiedCouponsViewController
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"UnifiedCouponsViewController"
)
as!
SwiftWarplyFramework
.
UnifiedCouponsViewController
vc
.
isFromCampaignVC
=
true
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
// swiftApi().getUnifiedCouponsDeals { unifiedCoupons in
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
// let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponsViewController") as! SwiftWarplyFramework.UnifiedCouponsViewController
// self.navigationController?.pushViewController(vc, animated: true)
// } failureCallback: { errorCode in
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
// let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponsViewController") as! SwiftWarplyFramework.UnifiedCouponsViewController
// self.navigationController?.pushViewController(vc, animated: true)
// }
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
// let vc = storyboard.instantiateViewController(withIdentifier: "WalletViewController") as! SwiftWarplyFramework.WalletViewController
...
...
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponsViewController.swift
View file @
2d12eaa
...
...
@@ -21,6 +21,7 @@ import SwiftEventBus
public
var
unifiedCoupons
:
Array
<
swiftApi
.
UnifiedCouponModel
>
=
[]
public
var
smCoupons
:
Array
<
swiftApi
.
CouponItemModel
>
=
[]
public
var
smCouponsSelected
:
Array
<
swiftApi
.
CouponItemModel
>
=
[]
public
var
isFromCampaignVC
:
Bool
=
false
// A reference to the Select All image view for later use
var
circleImageView
:
UIImageView
!
...
...
@@ -131,6 +132,12 @@ import SwiftEventBus
}
self
.
navigationController
?
.
hideHairline
()
if
(
self
.
isFromCampaignVC
==
true
)
{
swiftApi
()
.
getUnifiedCouponsDeals
{
unifiedCoupons
in
}
failureCallback
:
{
errorCode
in
}
}
}
// MARK: - Functions
...
...
Please
register
or
login
to post a comment