Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
5ef6d356
Commit
5ef6d356
authored
Mar 02, 2017
by
Daniel Dahan
Committed by
GitHub
Mar 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #696 from lazarte/master
Fixed issue with the spring animation views direction
parents
b8004f05
37df3054
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
22 deletions
+7
-22
Sources/iOS/SpringAnimation.swift
+7
-22
No files found.
Sources/iOS/SpringAnimation.swift
View file @
5ef6d356
...
@@ -286,11 +286,6 @@ extension SpringAnimation {
...
@@ -286,11 +286,6 @@ extension SpringAnimation {
- Parameter completion: A completion block to execute on each view's animation.
- Parameter completion: A completion block to execute on each view's animation.
*/
*/
fileprivate
func
expandDown
(
duration
:
TimeInterval
,
delay
:
TimeInterval
,
usingSpringWithDamping
:
CGFloat
,
initialSpringVelocity
:
CGFloat
,
options
:
UIViewAnimationOptions
,
animations
:
((
UIView
)
->
Void
)?,
completion
:
((
UIView
)
->
Void
)?)
{
fileprivate
func
expandDown
(
duration
:
TimeInterval
,
delay
:
TimeInterval
,
usingSpringWithDamping
:
CGFloat
,
initialSpringVelocity
:
CGFloat
,
options
:
UIViewAnimationOptions
,
animations
:
((
UIView
)
->
Void
)?,
completion
:
((
UIView
)
->
Void
)?)
{
guard
let
first
=
views
.
first
else
{
return
}
let
h
=
baseSize
.
height
for
i
in
0
..<
views
.
count
{
for
i
in
0
..<
views
.
count
{
let
v
=
views
[
i
]
let
v
=
views
[
i
]
...
@@ -301,9 +296,9 @@ extension SpringAnimation {
...
@@ -301,9 +296,9 @@ extension SpringAnimation {
usingSpringWithDamping
:
usingSpringWithDamping
,
usingSpringWithDamping
:
usingSpringWithDamping
,
initialSpringVelocity
:
initialSpringVelocity
,
initialSpringVelocity
:
initialSpringVelocity
,
options
:
options
,
options
:
options
,
animations
:
{
[
s
=
self
,
first
=
first
,
v
=
v
]
in
animations
:
{
[
s
=
interimSpace
,
m
=
CGFloat
(
i
+
1
)
,
v
=
v
]
in
v
.
alpha
=
1
v
.
alpha
=
1
v
.
y
=
first
.
y
+
h
+
CGFloat
(
i
-
1
)
*
s
.
itemSize
.
height
+
CGFloat
(
i
)
*
s
.
interimSpace
v
.
y
=
m
*
(
v
.
height
+
s
)
animations
?(
v
)
animations
?(
v
)
})
{
[
weak
self
,
v
=
v
]
_
in
})
{
[
weak
self
,
v
=
v
]
_
in
...
@@ -327,8 +322,6 @@ extension SpringAnimation {
...
@@ -327,8 +322,6 @@ extension SpringAnimation {
return
return
}
}
let
h
=
baseSize
.
height
for
i
in
0
..<
views
.
count
{
for
i
in
0
..<
views
.
count
{
let
v
=
views
[
i
]
let
v
=
views
[
i
]
...
@@ -339,7 +332,7 @@ extension SpringAnimation {
...
@@ -339,7 +332,7 @@ extension SpringAnimation {
options
:
options
,
options
:
options
,
animations
:
{
[
first
=
first
,
v
=
v
]
in
animations
:
{
[
first
=
first
,
v
=
v
]
in
v
.
alpha
=
0
v
.
alpha
=
0
v
.
y
=
first
.
y
+
h
v
.
y
=
first
.
y
animations
?(
v
)
animations
?(
v
)
})
{
[
weak
self
,
v
=
v
]
_
in
})
{
[
weak
self
,
v
=
v
]
_
in
...
@@ -359,9 +352,6 @@ extension SpringAnimation {
...
@@ -359,9 +352,6 @@ extension SpringAnimation {
- Parameter completion: A completion block to execute on each view's animation.
- Parameter completion: A completion block to execute on each view's animation.
*/
*/
fileprivate
func
expandLeft
(
duration
:
TimeInterval
,
delay
:
TimeInterval
,
usingSpringWithDamping
:
CGFloat
,
initialSpringVelocity
:
CGFloat
,
options
:
UIViewAnimationOptions
,
animations
:
((
UIView
)
->
Void
)?,
completion
:
((
UIView
)
->
Void
)?)
{
fileprivate
func
expandLeft
(
duration
:
TimeInterval
,
delay
:
TimeInterval
,
usingSpringWithDamping
:
CGFloat
,
initialSpringVelocity
:
CGFloat
,
options
:
UIViewAnimationOptions
,
animations
:
((
UIView
)
->
Void
)?,
completion
:
((
UIView
)
->
Void
)?)
{
guard
let
first
=
views
.
first
else
{
return
}
for
i
in
0
..<
views
.
count
{
for
i
in
0
..<
views
.
count
{
let
v
=
views
[
i
]
let
v
=
views
[
i
]
...
@@ -372,9 +362,9 @@ extension SpringAnimation {
...
@@ -372,9 +362,9 @@ extension SpringAnimation {
usingSpringWithDamping
:
usingSpringWithDamping
,
usingSpringWithDamping
:
usingSpringWithDamping
,
initialSpringVelocity
:
initialSpringVelocity
,
initialSpringVelocity
:
initialSpringVelocity
,
options
:
options
,
options
:
options
,
animations
:
{
[
s
=
self
,
first
=
first
,
v
=
v
]
in
animations
:
{
[
s
=
interimSpace
,
m
=
CGFloat
(
i
+
1
)
,
v
=
v
]
in
v
.
alpha
=
1
v
.
alpha
=
1
v
.
x
=
first
.
x
-
CGFloat
(
i
)
*
s
.
itemSize
.
width
-
CGFloat
(
i
)
*
s
.
interimSpace
v
.
x
=
-
m
*
(
v
.
width
+
s
)
animations
?(
v
)
animations
?(
v
)
})
{
[
weak
self
,
v
=
v
]
_
in
})
{
[
weak
self
,
v
=
v
]
_
in
...
@@ -428,11 +418,6 @@ extension SpringAnimation {
...
@@ -428,11 +418,6 @@ extension SpringAnimation {
- Parameter completion: A completion block to execute on each view's animation.
- Parameter completion: A completion block to execute on each view's animation.
*/
*/
fileprivate
func
expandRight
(
duration
:
TimeInterval
,
delay
:
TimeInterval
,
usingSpringWithDamping
:
CGFloat
,
initialSpringVelocity
:
CGFloat
,
options
:
UIViewAnimationOptions
,
animations
:
((
UIView
)
->
Void
)?,
completion
:
((
UIView
)
->
Void
)?)
{
fileprivate
func
expandRight
(
duration
:
TimeInterval
,
delay
:
TimeInterval
,
usingSpringWithDamping
:
CGFloat
,
initialSpringVelocity
:
CGFloat
,
options
:
UIViewAnimationOptions
,
animations
:
((
UIView
)
->
Void
)?,
completion
:
((
UIView
)
->
Void
)?)
{
guard
let
first
=
views
.
first
else
{
return
}
let
h
=
baseSize
.
height
for
i
in
0
..<
views
.
count
{
for
i
in
0
..<
views
.
count
{
let
v
=
views
[
i
]
let
v
=
views
[
i
]
...
@@ -443,9 +428,9 @@ extension SpringAnimation {
...
@@ -443,9 +428,9 @@ extension SpringAnimation {
usingSpringWithDamping
:
usingSpringWithDamping
,
usingSpringWithDamping
:
usingSpringWithDamping
,
initialSpringVelocity
:
initialSpringVelocity
,
initialSpringVelocity
:
initialSpringVelocity
,
options
:
options
,
options
:
options
,
animations
:
{
[
s
=
self
,
first
=
first
,
v
=
v
]
in
animations
:
{
[
s
=
interimSpace
,
m
=
CGFloat
(
i
+
1
)
,
v
=
v
]
in
v
.
alpha
=
1
v
.
alpha
=
1
v
.
x
=
first
.
x
+
h
+
CGFloat
(
i
-
1
)
*
s
.
itemSize
.
width
+
CGFloat
(
i
)
*
s
.
interimSpace
v
.
x
=
m
*
(
v
.
width
+
s
)
animations
?(
v
)
animations
?(
v
)
})
{
[
weak
self
,
v
=
v
]
_
in
})
{
[
weak
self
,
v
=
v
]
_
in
...
...
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