Skip to content

Commit 4d8fc3e

Browse files
committed
Release 1.0
1 parent 8e3a0ec commit 4d8fc3e

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

POP+MCAnimate.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'POP+MCAnimate'
3-
s.version = '0.3'
3+
s.version = '1.0'
44
s.platform = :ios, '7.0'
55
s.license = { :type => 'MIT', :file => 'LICENSE' }
66
s.summary = 'Concise syntax for the Pop animation framework.'

README.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ Concise syntax for the [Pop](https://github.com/facebook/pop) animation framewor
1010

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

13-
pod 'POP+MCAnimate'
13+
pod 'POP+MCAnimate', '~> 1.0'
1414

1515
or clone as a git submodule,
1616

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

1919
## Using POP+MCAnimate
2020

21+
**Breaking change:** Methods and properties have been prefixed with *pop_*. See section on shorthand syntax below.
22+
2123
Replace this:
2224

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

31-
With this:
33+
With this:*
3234

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

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

75-
## Remarks
77+
## Shorthand*
78+
79+
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**:
7680

77-
Currently only Pop animatable properties that correspond directly to UIKit properties are supported.
81+
#define MCANIMATE_SHORTHAND
82+
#import <POP+MCAnimate.h>
83+
84+
## Remarks
7885

7986
The list of supported properties are:
8087
- **CALayer** (and subclasses)
@@ -83,26 +90,47 @@ The list of supported properties are:
8390
- opacity
8491
- position
8592
- zPosition
93+
- *pop_*positionX
94+
- *pop_*positionY
95+
- *pop_*rotation
96+
- *pop_*rotationX
97+
- *pop_*rotationY
98+
- *pop_*scaleX
99+
- *pop_*scaleY
100+
- *pop_*scaleXY
101+
- *pop_*translationX
102+
- *pop_*translationXY
103+
- *pop_*translationY
104+
- *pop_*translationZ
105+
- *pop_*size
106+
86107

87108
- **CAShapeLayer**
88109
- strokeColor
89110
- strokeStart
90111
- strokeEnd
91112

113+
92114
- **NSLayoutConstraint**
93115
- constant
94116

117+
95118
- **UIView** (and subclasses)
96119
- alpha
97120
- backgroundColor
98121
- bounds
99122
- center
100123
- frame
124+
- *pop_*scaleX
125+
- *pop_*scaleY
126+
- *pop_*scaleXY
127+
101128

102129
- **UIScrollView** (and subclasses)
103130
- contentOffset
104131
- contentSize
105132

133+
106134
## License
107135

108136
POP+MCAnimate is under the MIT license.

0 commit comments

Comments
 (0)