Skip to content

Commit

Permalink
Release 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewcheok committed May 7, 2014
1 parent 8e3a0ec commit 4d8fc3e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion POP+MCAnimate.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'POP+MCAnimate'
s.version = '0.3'
s.version = '1.0'
s.platform = :ios, '7.0'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'Concise syntax for the Pop animation framework.'
Expand Down
36 changes: 32 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ Concise syntax for the [Pop](https://github.com/facebook/pop) animation framewor

Add the following to your [CocoaPods](http://cocoapods.org/) Podfile

pod 'POP+MCAnimate'
pod 'POP+MCAnimate', '~> 1.0'

or clone as a git submodule,

or just copy files in the ```POP+MCAnimate``` folder into your project.

## Using POP+MCAnimate

**Breaking change:** Methods and properties have been prefixed with *pop_*. See section on shorthand syntax below.

Replace this:

POPSpringAnimation *animation = [self.boxView pop_animationForKey:@"bounds"];
Expand All @@ -28,7 +30,7 @@ Replace this:
animation.toValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 200, 200)];
[self.boxView pop_addAnimation:animation forKey:@"bounds"];

With this:
With this:*

self.boxView.spring.bounds = CGRectMake(0, 0, 200, 200);

Expand Down Expand Up @@ -72,9 +74,14 @@ Block-based methods are provided on `NSObject` similar to UIKit block-based anim
self.boxView.spring.center = viewCenter;
}];

## Remarks
## Shorthand*

The above examples require the use of **shorthand** so you can drop the *pop_* prefix from methods and properties. Just include the following in your pre-compiled header file after importing **UIKit**:

Currently only Pop animatable properties that correspond directly to UIKit properties are supported.
#define MCANIMATE_SHORTHAND
#import <POP+MCAnimate.h>

## Remarks

The list of supported properties are:
- **CALayer** (and subclasses)
Expand All @@ -83,26 +90,47 @@ The list of supported properties are:
- opacity
- position
- zPosition
- *pop_*positionX
- *pop_*positionY
- *pop_*rotation
- *pop_*rotationX
- *pop_*rotationY
- *pop_*scaleX
- *pop_*scaleY
- *pop_*scaleXY
- *pop_*translationX
- *pop_*translationXY
- *pop_*translationY
- *pop_*translationZ
- *pop_*size


- **CAShapeLayer**
- strokeColor
- strokeStart
- strokeEnd


- **NSLayoutConstraint**
- constant


- **UIView** (and subclasses)
- alpha
- backgroundColor
- bounds
- center
- frame
- *pop_*scaleX
- *pop_*scaleY
- *pop_*scaleXY


- **UIScrollView** (and subclasses)
- contentOffset
- contentSize


## License

POP+MCAnimate is under the MIT license.

0 comments on commit 4d8fc3e

Please sign in to comment.