Release 1.0.0
This commit is contained in:
1 parent
5ecc0d4203
commit
40cdd4eb91
111 files changed
+5910
-1769
No files matched your search
+27
-2
@@ -7,13 +7,14 @@
|
||||
of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import "POPAnimation.h"
|
||||
|
||||
#import <QuartzCore/CAMediaTimingFunction.h>
|
||||
|
||||
#import "POPAnimation.h"
|
||||
#import "POPAction.h"
|
||||
#import "POPAnimationRuntime.h"
|
||||
#import "POPAnimationTracerInternal.h"
|
||||
#import "POPSpringSolver.h"
|
||||
#import "POPAction.h"
|
||||
|
||||
using namespace POP;
|
||||
|
||||
@@ -34,7 +35,10 @@ typedef struct
|
||||
bool reached;
|
||||
} POPProgressMarker;
|
||||
|
||||
typedef void (^POPAnimationDidStartBlock)(POPAnimation *anim);
|
||||
typedef void (^POPAnimationDidReachToValueBlock)(POPAnimation *anim);
|
||||
typedef void (^POPAnimationCompletionBlock)(POPAnimation *anim, BOOL finished);
|
||||
typedef void (^POPAnimationDidApplyBlock)(POPAnimation *anim);
|
||||
|
||||
@interface POPAnimation()
|
||||
- (instancetype)_init;
|
||||
@@ -199,7 +203,10 @@ struct _POPAnimationState
|
||||
CFTimeInterval startTime;
|
||||
CFTimeInterval lastTime;
|
||||
id __weak delegate;
|
||||
POPAnimationDidStartBlock animationDidStartBlock;
|
||||
POPAnimationDidReachToValueBlock animationDidReachToValueBlock;
|
||||
POPAnimationCompletionBlock completionBlock;
|
||||
POPAnimationDidApplyBlock animationDidApplyBlock;
|
||||
NSMutableDictionary *dict;
|
||||
POPAnimationTracer *tracer;
|
||||
CGFloat progress;
|
||||
@@ -232,7 +239,10 @@ struct _POPAnimationState
|
||||
startTime(0),
|
||||
lastTime(0),
|
||||
delegate(nil),
|
||||
animationDidStartBlock(nil),
|
||||
animationDidReachToValueBlock(nil),
|
||||
completionBlock(nil),
|
||||
animationDidApplyBlock(nil),
|
||||
dict(nil),
|
||||
tracer(nil),
|
||||
progress(0),
|
||||
@@ -258,7 +268,10 @@ struct _POPAnimationState
|
||||
name = nil;
|
||||
dict = nil;
|
||||
tracer = nil;
|
||||
animationDidStartBlock = NULL;
|
||||
animationDidReachToValueBlock = NULL;
|
||||
completionBlock = NULL;
|
||||
animationDidApplyBlock = NULL;
|
||||
}
|
||||
|
||||
bool isCustom() {
|
||||
@@ -364,6 +377,12 @@ struct _POPAnimationState
|
||||
ActionEnabler enabler;
|
||||
[delegate pop_animationDidStart:self];
|
||||
}
|
||||
|
||||
POPAnimationDidStartBlock block = animationDidStartBlock;
|
||||
if (block != NULL) {
|
||||
ActionEnabler enabler;
|
||||
block(self);
|
||||
}
|
||||
|
||||
if (tracing) {
|
||||
[tracer didStart];
|
||||
@@ -451,6 +470,12 @@ struct _POPAnimationState
|
||||
ActionEnabler enabler;
|
||||
[delegate pop_animationDidApply:self];
|
||||
}
|
||||
|
||||
POPAnimationDidApplyBlock block = animationDidApplyBlock;
|
||||
if (block != NULL) {
|
||||
ActionEnabler enabler;
|
||||
block(self);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void reset(bool all) {
|
||||
|
||||
Reference in new issue
Block a user