Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Motion
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
Motion
Commits
67550d30
Unverified
Commit
67550d30
authored
Jun 27, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated motion API to animate
parent
61eb033d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
Sources/Extensions/Motion+CALayer.swift
+5
-5
Sources/Extensions/Motion+UIView.swift
+4
-4
No files found.
Sources/Extensions/Motion+CALayer.swift
View file @
67550d30
...
@@ -123,8 +123,8 @@ extension CALayer {
...
@@ -123,8 +123,8 @@ extension CALayer {
A function that accepts a list of MotionAnimation values and executes them.
A function that accepts a list of MotionAnimation values and executes them.
- Parameter animations: A list of MotionAnimation values.
- Parameter animations: A list of MotionAnimation values.
*/
*/
public
func
motion
(
_
animations
:
MotionAnimation
...
)
{
public
func
animate
(
_
animations
:
MotionAnimation
...
)
{
motion
(
animations
)
animate
(
animations
)
}
}
/**
/**
...
@@ -132,8 +132,8 @@ extension CALayer {
...
@@ -132,8 +132,8 @@ extension CALayer {
- Parameter animations: An Array of MotionAnimation values.
- Parameter animations: An Array of MotionAnimation values.
- Parameter completion: An optional completion block.
- Parameter completion: An optional completion block.
*/
*/
public
func
motion
(
_
animations
:
[
MotionAnimation
],
completion
:
(()
->
Void
)?
=
nil
)
{
public
func
animate
(
_
animations
:
[
MotionAnimation
],
completion
:
(()
->
Void
)?
=
nil
)
{
motion
(
delay
:
0
,
duration
:
0.35
,
timingFunction
:
.
easeInOut
,
animations
:
animations
,
completion
:
completion
)
animate
(
delay
:
0
,
duration
:
0.35
,
timingFunction
:
.
easeInOut
,
animations
:
animations
,
completion
:
completion
)
}
}
/**
/**
...
@@ -144,7 +144,7 @@ extension CALayer {
...
@@ -144,7 +144,7 @@ extension CALayer {
- Parameter animations: An Array of MotionAnimations.
- Parameter animations: An Array of MotionAnimations.
- Parameter completion: An optional completion block.
- Parameter completion: An optional completion block.
*/
*/
fileprivate
func
motion
(
delay
:
TimeInterval
,
duration
:
TimeInterval
,
timingFunction
:
CAMediaTimingFunctionType
,
animations
:
[
MotionAnimation
],
completion
:
(()
->
Void
)?
=
nil
)
{
fileprivate
func
animate
(
delay
:
TimeInterval
,
duration
:
TimeInterval
,
timingFunction
:
CAMediaTimingFunctionType
,
animations
:
[
MotionAnimation
],
completion
:
(()
->
Void
)?
=
nil
)
{
var
t
=
delay
var
t
=
delay
for
v
in
animations
{
for
v
in
animations
{
...
...
Sources/Extensions/Motion+UIView.swift
View file @
67550d30
...
@@ -173,8 +173,8 @@ public extension UIView {
...
@@ -173,8 +173,8 @@ public extension UIView {
them on the view's backing layer.
them on the view's backing layer.
- Parameter animations: A list of MotionAnimation values.
- Parameter animations: A list of MotionAnimation values.
*/
*/
func
motion
(
_
animations
:
MotionAnimation
...
)
{
func
animate
(
_
animations
:
MotionAnimation
...
)
{
layer
.
motion
(
animations
)
layer
.
animate
(
animations
)
}
}
/**
/**
...
@@ -183,8 +183,8 @@ public extension UIView {
...
@@ -183,8 +183,8 @@ public extension UIView {
- Parameter animations: An Array of MotionAnimation values.
- Parameter animations: An Array of MotionAnimation values.
- Parameter completion: An optional completion block.
- Parameter completion: An optional completion block.
*/
*/
func
motion
(
_
animations
:
[
MotionAnimation
],
completion
:
(()
->
Void
)?
=
nil
)
{
func
animate
(
_
animations
:
[
MotionAnimation
],
completion
:
(()
->
Void
)?
=
nil
)
{
layer
.
motion
(
animations
,
completion
:
completion
)
layer
.
animate
(
animations
,
completion
:
completion
)
}
}
}
}
...
...
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