Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
tunnel
liberty-tunnel-client-library-apple
Commits
fa19751a
Commit
fa19751a
authored
Dec 04, 2018
by
Jose Blaya
Browse files
Fix loading spinner view & position
parent
c8573951
Changes
1
Hide whitespace changes
Inline
Side-by-side
PIALibrary/Sources/UI/iOS/ViewControllers/AutolayoutViewController.swift
View file @
fa19751a
...
...
@@ -174,7 +174,7 @@ extension AutolayoutViewController: AnimatingLoadingDelegate {
public
func
showLoadingAnimation
()
{
if
graphLoad
==
nil
{
containerView
=
UIView
(
frame
:
self
.
view
.
frame
)
containerView
=
UIView
(
frame
:
UIScreen
.
main
.
bounds
)
containerView
?
.
backgroundColor
=
.
white
containerView
?
.
alpha
=
0.2
graphLoad
=
LOTAnimationView
(
name
:
"pia-spinner"
)
...
...
@@ -187,8 +187,10 @@ extension AutolayoutViewController: AnimatingLoadingDelegate {
graphLoad
?
.
loopAnimation
=
true
if
let
graphLoad
=
graphLoad
,
let
containerView
=
containerView
{
view
.
addSubview
(
containerView
)
view
.
addSubview
(
graphLoad
)
if
let
key
=
self
.
navigationController
?
.
view
{
key
.
addSubview
(
containerView
)
key
.
addSubview
(
graphLoad
)
}
graphLoad
.
play
()
}
}
...
...
@@ -200,10 +202,10 @@ extension AutolayoutViewController: AnimatingLoadingDelegate {
}
public
func
adjustLottieSize
()
{
let
lottieWidth
=
view
.
frame
.
width
/
4
let
lottieWidth
=
UIScreen
.
main
.
bounds
.
width
/
4
graphLoad
?
.
frame
=
CGRect
(
x
:
(
view
.
frame
.
width
/
2
)
-
(
lottieWidth
/
2
),
y
:
(
view
.
frame
.
height
-
lottieWidth
)
/
2
,
x
:
(
UIScreen
.
main
.
bounds
.
width
/
2
)
-
(
lottieWidth
/
2
),
y
:
(
UIScreen
.
main
.
bounds
.
height
-
lottieWidth
)
/
2
,
width
:
lottieWidth
,
height
:
lottieWidth
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment