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-09-07 16:35:51 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3767180d67f1024632055b580f08d8b22a4100db
3767180d
1 parent
12333de0
add pacing Goal Achieved popup
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
3767180
...
...
@@ -4040,7 +4040,7 @@ public class swiftApi {
}
public
func
getPacingDetailsAsync
(
_
getPacingDetailsCallback
:
@escaping
(
_
pacingData
:
PacingDetails
?)
->
Void
)
->
Void
{
public
func
getPacingDetailsAsync
(
_
controller
:
UIViewController
,
_
getPacingDetailsCallback
:
@escaping
(
_
pacingData
:
PacingDetails
?)
->
Void
)
->
Void
{
let
instanceOfMyApi
=
MyApi
()
instanceOfMyApi
.
getPacingDetailsAsync
(
pacingCallback
,
failureBlock
:
pacingFailureCallback
)
...
...
@@ -4053,6 +4053,10 @@ public class swiftApi {
let
pacingDataResult
=
(
pacingDataDictionary
[
"result"
]
as?
[
String
:
Any
]
??
[
String
:
Any
]())
let
tempPacingDetails
=
PacingDetails
(
dictionary
:
pacingDataResult
)
if
(
tempPacingDetails
.
_meters
.
_month
.
_value
>=
tempPacingDetails
.
_meters
.
_month
.
_goal
)
{
self
.
pacingGoalDialog
(
controller
)
}
getPacingDetailsCallback
(
tempPacingDetails
);
}
...
...
@@ -4070,6 +4074,26 @@ public class swiftApi {
}
func
pacingGoalDialog
(
_
controller
:
UIViewController
)
->
Void
{
let
alert
=
UIAlertController
(
title
:
"Συγχαρητήρια!"
,
message
:
"Πέτυχες το στόχο του μήνα! Διάλεξε το δώρο που επιθυμείς να ενεργοποιήσεις!"
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
{
action
in
switch
action
.
style
{
case
.
default
:
print
(
"default"
)
case
.
cancel
:
print
(
"cancel"
)
case
.
destructive
:
print
(
"destructive"
)
}
}))
controller
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
}
public
func
setPacingDetailsAsync
(
_
steps
:
Int
,
_
date
:
String
,
_
setPacingDetailsCallback
:
@escaping
(
_
responseData
:
GenericResponseModel
?)
->
Void
)
->
Void
{
let
instanceOfMyApi
=
MyApi
()
...
...
Please
register
or
login
to post a comment