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-03-21 14:08:11 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
01c5c7f6bacf30566c8166df8b1d7b899e9b8ffd
01c5c7f6
1 parent
d7e2446c
Add open_my_rewards event and ui fixes at CouponViewController
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
5 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
01c5c7f
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
View file @
01c5c7f
...
...
@@ -95,11 +95,11 @@ import SwiftEventBus
let
targetSize
=
CGSize
(
width
:
descriptionTextView
.
frame
.
width
,
height
:
CGFloat
(
MAXFLOAT
))
descriptionTextViewHeight
.
constant
=
descriptionTextView
.
sizeThatFits
(
targetSize
)
.
height
redeemButton
.
setTitle
(
"Απόκτησέ το"
,
for
:
.
normal
)
redeemButton
.
setTitle
(
"Απόκτησέ το
δωρεάν
"
,
for
:
.
normal
)
redeemButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
redeemButton
.
backgroundColor
=
UIColor
(
red
:
0.05
,
green
:
0.65
,
blue
:
0.00
,
alpha
:
1.00
)
redeemButton
.
layer
.
cornerRadius
=
16.0
redeemButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
redeemButton
.
intrinsicContentSize
.
width
,
height
:
50
)
//
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 50)
redeemButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
0
,
left
:
25
,
bottom
:
0
,
right
:
25
)
// Fix width for ipad
if
UIDevice
.
current
.
userInterfaceIdiom
==
.
pad
{
...
...
@@ -261,7 +261,7 @@ import SwiftEventBus
SwiftEventBus
.
post
(
"ccms_enabled"
,
sender
:
ccmsEnabled
)
}
self
.
showSuccessDialog
(
"Επιτυχής ενεργοποίηση"
,
"Το κουπόνι σου έχει ενεργοποιηθεί στην ενότητα My Rewards."
)
self
.
showSuccessDialog
(
"Επιτυχής ενεργοποίηση"
,
"Το κουπόνι σου έχει ενεργοποιηθεί
και βρίσκεται
στην ενότητα My Rewards."
)
swiftApi
()
.
getCouponsAsync
(
getCouponsCallback
,
failureCallback
:
{
errorCode
in
})
swiftApi
()
.
getCampaignsAsyncNew
(
language
:
"en"
,
filters
:
[
String
:
Any
](),
getCampaignsCallback
,
failureCallback
:
{
errorCode
in
})
...
...
@@ -341,10 +341,28 @@ import SwiftEventBus
func
showSuccessDialog
(
_
alertTitle
:
String
,
_
alertSubTitle
:
String
)
->
Void
{
let
alert
=
UIAlertController
(
title
:
alertTitle
,
message
:
alertSubTitle
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
{
action
in
let
cancelButton
=
UIAlertAction
(
title
:
"Ακύρωση"
,
style
:
.
default
,
handler
:
{
action
in
switch
action
.
style
{
case
.
default
:
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
case
.
cancel
:
print
(
"cancel"
)
case
.
destructive
:
print
(
"destructive"
)
}
})
// cancelButton.setValue(UIColor(rgb: 0xFC5757), forKey: "titleTextColor")
alert
.
addAction
(
cancelButton
)
alert
.
addAction
(
UIAlertAction
(
title
:
"Δες το κουπόνι"
,
style
:
.
default
,
handler
:
{
action
in
switch
action
.
style
{
case
.
default
:
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
SwiftEventBus
.
post
(
"open_my_rewards"
)
case
.
cancel
:
print
(
"cancel"
)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
01c5c7f
...
...
@@ -5710,7 +5710,7 @@
<textInputTraits
key=
"textInputTraits"
autocapitalizationType=
"sentences"
/>
</textView>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"FCd-hv-dHg"
>
<rect
key=
"frame"
x=
"
158"
y=
"384.5"
width=
"98
"
height=
"50"
/>
<rect
key=
"frame"
x=
"
20"
y=
"384.5"
width=
"374
"
height=
"50"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"n2w-Tx-hhO"
/>
</constraints>
...
...
@@ -5758,6 +5758,7 @@
<constraint
firstAttribute=
"trailing"
secondItem=
"isU-Qv-94G"
secondAttribute=
"trailing"
constant=
"20"
id=
"7cL-ob-hXY"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"siA-c8-Ub8"
secondAttribute=
"trailing"
constant=
"20"
id=
"C8g-1f-Ef3"
/>
<constraint
firstAttribute=
"bottom"
relation=
"greaterThanOrEqual"
secondItem=
"siA-c8-Ub8"
secondAttribute=
"bottom"
constant=
"30"
id=
"FOo-d7-zvC"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"FCd-hv-dHg"
secondAttribute=
"trailing"
constant=
"20"
id=
"LEE-CW-2J5"
/>
<constraint
firstItem=
"siA-c8-Ub8"
firstAttribute=
"top"
secondItem=
"KvN-fk-rlm"
secondAttribute=
"bottom"
id=
"MHv-4j-YYr"
/>
<constraint
firstItem=
"FCd-hv-dHg"
firstAttribute=
"centerX"
secondItem=
"uTN-Qr-wBi"
secondAttribute=
"centerX"
id=
"OFE-Xc-Ui3"
/>
<constraint
firstItem=
"isU-Qv-94G"
firstAttribute=
"leading"
secondItem=
"uTN-Qr-wBi"
secondAttribute=
"leading"
constant=
"20"
id=
"PR6-tJ-tw0"
/>
...
...
@@ -5770,6 +5771,7 @@
<constraint
firstItem=
"3SX-fR-ph2"
firstAttribute=
"leading"
secondItem=
"uTN-Qr-wBi"
secondAttribute=
"leading"
id=
"nBV-nm-wOq"
/>
<constraint
firstItem=
"3SX-fR-ph2"
firstAttribute=
"top"
secondItem=
"uTN-Qr-wBi"
secondAttribute=
"top"
id=
"oaX-KH-TEh"
/>
<constraint
firstItem=
"isU-Qv-94G"
firstAttribute=
"top"
secondItem=
"3SX-fR-ph2"
secondAttribute=
"bottom"
constant=
"30"
id=
"vQf-lC-GgG"
/>
<constraint
firstItem=
"FCd-hv-dHg"
firstAttribute=
"leading"
secondItem=
"uTN-Qr-wBi"
secondAttribute=
"leading"
constant=
"20"
id=
"xB0-5K-hPZ"
/>
</constraints>
</view>
</subviews>
...
...
Please
register
or
login
to post a comment