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
7eb6d70c
Commit
7eb6d70c
authored
Mar 12, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated pulse animation durations
parent
f5ceb503
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
16 deletions
+10
-16
Examples/Programmatic/MaterialPulseView/MaterialPulseView.xcodeproj/project.pbxproj
+0
-6
Examples/Programmatic/MaterialPulseView/MaterialPulseView/ViewController.swift
+8
-8
Sources/MaterialPulseAnimation.swift
+2
-2
No files found.
Examples/Programmatic/MaterialPulseView/MaterialPulseView.xcodeproj/project.pbxproj
View file @
7eb6d70c
...
...
@@ -7,8 +7,6 @@
objects
=
{
/* Begin PBXBuildFile section */
968F17241C94B5AD008CA3F6
/* Material.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
968F17231C94B5AD008CA3F6
/* Material.framework */
;
};
968F17251C94B5AD008CA3F6
/* Material.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
968F17231C94B5AD008CA3F6
/* Material.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
96DB1C5F1C14AA2800825BE6
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96DB1C5E1C14AA2800825BE6
/* AppDelegate.swift */
;
};
96DB1C611C14AA2800825BE6
/* ViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96DB1C601C14AA2800825BE6
/* ViewController.swift */
;
};
96DB1C661C14AA2800825BE6
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96DB1C651C14AA2800825BE6
/* Assets.xcassets */
;
};
...
...
@@ -22,7 +20,6 @@
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
968F17251C94B5AD008CA3F6
/* Material.framework in Embed Frameworks */
,
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
...
...
@@ -30,7 +27,6 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
968F17231C94B5AD008CA3F6
/* Material.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
name
=
Material.framework
;
path
=
"/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"
;
sourceTree
=
"<absolute>"
;
};
96DB1C5B1C14AA2800825BE6
/* MaterialPulseView.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
MaterialPulseView.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
96DB1C5E1C14AA2800825BE6
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
96DB1C601C14AA2800825BE6
/* ViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -44,7 +40,6 @@
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
968F17241C94B5AD008CA3F6
/* Material.framework in Frameworks */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -54,7 +49,6 @@
96DB1C521C14AA2800825BE6
=
{
isa
=
PBXGroup
;
children
=
(
968F17231C94B5AD008CA3F6
/* Material.framework */
,
96DB1C5D1C14AA2800825BE6
/* MaterialPulseView */
,
96DB1C5C1C14AA2800825BE6
/* Products */
,
);
...
...
Examples/Programmatic/MaterialPulseView/MaterialPulseView/ViewController.swift
View file @
7eb6d70c
...
...
@@ -59,21 +59,21 @@ class ViewController: UIViewController {
pulseView
.
shape
=
.
Square
pulseView
.
depth
=
.
Depth1
pulseView
.
cornerRadiusPreset
=
.
Radius3
pulseView
.
pulseFocus
=
true
// pulseView.pulseFocus = true // Optional focus animation.
// Add pulseView to UIViewController.
view
.
addSubview
(
pulseView
)
//
// Trigger the pulse animation.
// Trigger the pulse animation.
// MaterialAnimation.delay(4) {
// pulseView.pulse(CGPointMake(30, 30))
// }
//
//
pulseView.animate(MaterialAnimation.animationGroup([
//
MaterialAnimation.rotate(rotation: 0.5),
//
MaterialAnimation.rotateX(rotation: 2),
//
MaterialAnimation.translateY(200)
//
], duration: 4))
pulseView
.
animate
(
MaterialAnimation
.
animationGroup
([
MaterialAnimation
.
rotate
(
rotation
:
0.5
),
MaterialAnimation
.
rotateX
(
rotation
:
2
),
MaterialAnimation
.
translateY
(
200
)
],
duration
:
4
))
}
}
Sources/MaterialPulseAnimation.swift
View file @
7eb6d70c
...
...
@@ -68,7 +68,7 @@ internal extension MaterialAnimation {
pulseLayer
!.
hidden
=
false
}
pulseLayer
!.
addAnimation
(
MaterialAnimation
.
scale
(
3
*
d
,
duration
:
duration
),
forKey
:
nil
)
pulseLayer
!.
addAnimation
(
MaterialAnimation
.
scale
(
(
b
?
3
:
1.7
)
*
d
,
duration
:
duration
),
forKey
:
nil
)
if
b
{
MaterialAnimation
.
delay
(
duration
)
{
...
...
@@ -80,7 +80,7 @@ internal extension MaterialAnimation {
}
}
else
{
MaterialAnimation
.
delay
(
duration
/
2
)
{
pulseLayer
?
.
addAnimation
(
MaterialAnimation
.
scale
(
1.
10
*
d
,
duration
:
duration
),
forKey
:
nil
)
pulseLayer
?
.
addAnimation
(
MaterialAnimation
.
scale
(
1.
3
*
d
,
duration
:
duration
),
forKey
:
nil
)
}
}
}
...
...
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