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
b9f7bf00
Unverified
Commit
b9f7bf00
authored
Jan 09, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: added fade to MotionAnimation
parent
00a46e33
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
Sources/iOS/BasicMotion.swift
+0
-0
Sources/iOS/KeyframeMotion.swift
+1
-1
Sources/iOS/PulseMotion.swift
+4
-7
No files found.
Sources/iOS/BasicMotion.swift
View file @
b9f7bf00
This diff is collapsed.
Click to expand it.
Sources/iOS/KeyframeMotion.swift
View file @
b9f7bf00
...
...
@@ -63,7 +63,7 @@ extension Motion {
*/
public
static
func
path
(
bezierPath
:
UIBezierPath
,
mode
:
AnimationRotationMode
=
.
auto
,
duration
:
CFTimeInterval
?
=
nil
)
->
CAKeyframeAnimation
{
let
animation
=
CAKeyframeAnimation
()
animation
.
keyPath
=
AnimationKeyPath
.
position
.
rawValue
animation
.
keyPath
=
Motion
AnimationKeyPath
.
position
.
rawValue
animation
.
path
=
bezierPath
.
cgPath
animation
.
rotationMode
=
AnimationRotationModeToValue
(
mode
:
mode
)
...
...
Sources/iOS/PulseMotion.swift
View file @
b9f7bf00
...
...
@@ -146,13 +146,13 @@ extension PulseMotion {
switch
animation
{
case
.
centerWithBacking
,
.
backing
,
.
pointWithBacking
,
.
tap
:
bLayer
.
add
(
Motion
.
background
(
color
:
color
.
withAlphaComponent
(
opacity
/
2
),
duration
:
duration
),
forKey
:
nil
)
bLayer
.
motion
(
duration
:
duration
,
animations
:
.
background
(
color
:
color
.
withAlphaComponent
(
opacity
/
2
))
)
default
:
break
}
switch
animation
{
case
.
center
,
.
centerWithBacking
,
.
centerRadialBeyondBounds
,
.
radialBeyondBounds
,
.
point
,
.
pointWithBacking
:
pLayer
.
add
(
Motion
.
scale
(
by
:
1
,
duration
:
duration
),
forKey
:
nil
)
pLayer
.
motion
(
duration
:
duration
,
animations
:
.
scale
(
by
:
1
)
)
default
:
break
}
...
...
@@ -182,16 +182,13 @@ extension PulseMotion {
switch
animation
{
case
.
centerWithBacking
,
.
backing
,
.
pointWithBacking
,
.
tap
:
bLayer
.
add
(
Motion
.
background
(
color
:
color
.
withAlphaComponent
(
0
),
duration
:
duration
),
forKey
:
nil
)
bLayer
.
motion
(
duration
:
duration
,
animations
:
.
background
(
color
:
color
.
withAlphaComponent
(
0
))
)
default
:
break
}
switch
animation
{
case
.
center
,
.
centerWithBacking
,
.
centerRadialBeyondBounds
,
.
radialBeyondBounds
,
.
point
,
.
pointWithBacking
:
pLayer
.
add
(
Motion
.
animate
(
group
:
[
Motion
.
scale
(
by
:
.
center
==
animation
?
1
:
1.325
),
Motion
.
background
(
color
:
color
.
withAlphaComponent
(
0
))
],
duration
:
duration
),
forKey
:
nil
)
pLayer
.
motion
(
duration
:
duration
,
animations
:
.
scale
(
by
:
.
center
==
animation
?
1
:
1.325
),
.
background
(
color
:
color
.
withAlphaComponent
(
0
)))
default
:
break
}
...
...
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