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-08-31 14:18:44 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e7a007303865c25a6b8f38d8b1a48fb61db29df0
e7a00730
1 parent
8e00f34f
nonTelco popup in couponVC
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
View file @
e7a0073
...
...
@@ -22,6 +22,8 @@ import UIKit
@IBOutlet
weak
var
termsTextView
:
UITextView
!
@IBOutlet
weak
var
termsTextViewHeight
:
NSLayoutConstraint
!
public
var
profile
:
swiftApi
.
ProfileModel
?
=
swiftApi
()
.
getConsumer
()
let
uiscreen
:
CGRect
=
UIScreen
.
main
.
bounds
var
termsVisible
:
Bool
=
false
;
...
...
@@ -38,6 +40,10 @@ import UIKit
setBackButton
()
setNavigationTitle
(
"Εκπτωτικό κουπόνι"
)
if
((
profile
!=
nil
)
&&
(
profile
?
.
_nonTelco
==
true
))
{
nonTelcoDialog
(
""
,
"Παρακαλούμε πολύ πρόσθεσε τις συνδέσεις σου στην COSMOTE για να έχεις πρόσβαση στα προνόμια του νέου Loyalty προγράμματος της COSMOTE!"
);
}
backgroundImage
.
image
=
UIImage
(
named
:
"coupons_scrollview_white"
,
in
:
Bundle
(
for
:
MyEmptyClass
.
self
),
compatibleWith
:
nil
)
scrollView
.
clipsToBounds
=
true
...
...
@@ -80,6 +86,26 @@ import UIKit
}
// MARK: - Functions
func
nonTelcoDialog
(
_
alertTitle
:
String
,
_
alertSubTitle
:
String
)
->
Void
{
let
alert
=
UIAlertController
(
title
:
alertTitle
,
message
:
alertSubTitle
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
{
action
in
switch
action
.
style
{
case
.
default
:
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
dismiss
(
animated
:
true
,
completion
:
{})
case
.
cancel
:
print
(
"cancel"
)
case
.
destructive
:
print
(
"destructive"
)
}
}))
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
}
func
toggleTerms
()
{
if
(
termsVisible
)
{
termsTextView
.
isHidden
=
false
...
...
Please
register
or
login
to post a comment