Commit 68ebdb0c by Daniel Dahan

updated README for latest API changes

parent a9f73344
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Motion' s.name = 'Motion'
s.version = '1.0.3' s.version = '1.0.4'
s.license = 'BSD-3-Clause' s.license = 'BSD-3-Clause'
s.summary = 'Seamless animations and transitions in Swift.' s.summary = 'Seamless animations and transitions in Swift.'
s.homepage = 'http://cosmicmind.com' s.homepage = 'http://cosmicmind.com'
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
961409AA1E43CF1B00E7BA99 /* Motion+Obj-C.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961409A91E43CF1B00E7BA99 /* Motion+Obj-C.swift */; }; 961409AA1E43CF1B00E7BA99 /* Motion+Obj-C.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961409A91E43CF1B00E7BA99 /* Motion+Obj-C.swift */; };
961409B61E43D17200E7BA99 /* Motion+Obj-C.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961409A91E43CF1B00E7BA99 /* Motion+Obj-C.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 961409B61E43D17200E7BA99 /* Motion+Obj-C.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961409A91E43CF1B00E7BA99 /* Motion+Obj-C.swift */; settings = {ATTRIBUTES = (Public, ); }; };
961409B81E43D21300E7BA99 /* Motion.h in Headers */ = {isa = PBXBuildFile; fileRef = 96C98DED1E438A5700B22906 /* Motion.h */; settings = {ATTRIBUTES = (Public, ); }; }; 961409B81E43D21300E7BA99 /* Motion.h in Headers */ = {isa = PBXBuildFile; fileRef = 96C98DED1E438A5700B22906 /* Motion.h */; settings = {ATTRIBUTES = (Public, ); }; };
96BFC1701E63C3460075DE1F /* Motion.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96C98DE31E4382B100B22906 /* Motion.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96C98DE41E4382B100B22906 /* Motion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C98DE31E4382B100B22906 /* Motion.swift */; }; 96C98DE41E4382B100B22906 /* Motion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C98DE31E4382B100B22906 /* Motion.swift */; };
96C98DE61E43848500B22906 /* MotionAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C98DE51E43848500B22906 /* MotionAnimation.swift */; }; 96C98DE61E43848500B22906 /* MotionAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C98DE51E43848500B22906 /* MotionAnimation.swift */; };
96C98DEB1E4389BE00B22906 /* MotionAnimation.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96C98DE51E43848500B22906 /* MotionAnimation.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96C98DEB1E4389BE00B22906 /* MotionAnimation.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96C98DE51E43848500B22906 /* MotionAnimation.swift */; settings = {ATTRIBUTES = (Public, ); }; };
...@@ -74,6 +75,7 @@ ...@@ -74,6 +75,7 @@
files = ( files = (
961409B81E43D21300E7BA99 /* Motion.h in Headers */, 961409B81E43D21300E7BA99 /* Motion.h in Headers */,
961409B61E43D17200E7BA99 /* Motion+Obj-C.swift in Headers */, 961409B61E43D17200E7BA99 /* Motion+Obj-C.swift in Headers */,
96BFC1701E63C3460075DE1F /* Motion.swift in Headers */,
96C98DEB1E4389BE00B22906 /* MotionAnimation.swift in Headers */, 96C98DEB1E4389BE00B22906 /* MotionAnimation.swift in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
......
## Welcome to Motion ## Welcome to Motion
Motion is a new tool used to create transition animations between view controllers. Motion is a tool used to create transition animations between view controllers.
## Sample ## Sample
...@@ -39,10 +39,12 @@ Motion is a growing project and will encounter changes throughout its developmen ...@@ -39,10 +39,12 @@ Motion is a growing project and will encounter changes throughout its developmen
## Motion Animations ## Motion Animations
You can add animations to any UIView or CALayer using the *motion* API. For example, to change the background color of a view with a 45 degree rotation: You can add animations to any UIView or CALayer using the *motion* API with an optional completion block. For example, to change the background color of a view with a 45 degree rotation:
```swift ```swift
view.motion(.backgroundColor(.blue), .rotationAngle(45)) view.motion(.backgroundColor(.blue), .rotationAngle(45)) {
// Do something when complete.
}
``` ```
### Available Motion Animation Values ### Available Motion Animation Values
...@@ -75,12 +77,16 @@ view.motion(.backgroundColor(.blue), .rotationAngle(45)) ...@@ -75,12 +77,16 @@ view.motion(.backgroundColor(.blue), .rotationAngle(45))
- y - y
- point - point
- position - position
- shadow
- fade - fade
- zPosition - zPosition
- width - width
- height - height
- size - size
- shadowPath
- shadowOffset
- shadowOpacity
- shadowRadius
- depth
## Motion Transitions ## Motion Transitions
...@@ -112,7 +118,7 @@ bar.motionAnimations = [.delay(0.35), .duration(3)] ...@@ -112,7 +118,7 @@ bar.motionAnimations = [.delay(0.35), .duration(3)]
## Enabling Motion Transitions ## Enabling Motion Transitions
To turn on Motion transitions between view controllers, set the *isMotionEnabled* property to `true` within the view controllers that transition between each other. To turn on Motion transitions between view controllers, set the *isMotionEnabled* property to `true` within the view controllers that transition between each other, and any container controllers, such as `UINavigationController`.
## Motion Delegate ## Motion Delegate
...@@ -123,7 +129,7 @@ func motion(motion: Motion, willTransition fromView: UIView, toView: UIView) ...@@ -123,7 +129,7 @@ func motion(motion: Motion, willTransition fromView: UIView, toView: UIView)
func motion(motion: Motion, didTransition fromView: UIView, toView: UIView) func motion(motion: Motion, didTransition fromView: UIView, toView: UIView)
func motionModifyDelay(motion: Motion) -> TimeInterval func motionDelayTransitionByTimeInterval(motion: Motion) -> TimeInterval
``` ```
### More... ### More...
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0.3</string> <string>1.0.4</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string> <string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment