diff --git a/POP+MCAnimate.podspec b/POP+MCAnimate.podspec index 835fb83..ff2e65e 100644 --- a/POP+MCAnimate.podspec +++ b/POP+MCAnimate.podspec @@ -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.' diff --git a/README.md b/README.md index 9839ffb..ab12d4e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ 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, @@ -18,6 +18,8 @@ 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"]; @@ -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); @@ -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 + +## Remarks The list of supported properties are: - **CALayer** (and subclasses) @@ -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.