forked from efrederickson/Multiplexer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
SKBounceAnimation.h
31 lines (23 loc) · 1.01 KB
/
SKBounceAnimation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// SKBounceAnimation.h
// SKBounceAnimation
//
// Created by Soroush Khanlou on 6/15/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
typedef CGFloat SKBounceAnimationStiffness;
extern SKBounceAnimationStiffness SKBounceAnimationStiffnessLight;
extern SKBounceAnimationStiffness SKBounceAnimationStiffnessMedium;
extern SKBounceAnimationStiffness SKBounceAnimationStiffnessHeavy;
@interface SKBounceAnimation : CAKeyframeAnimation
@property (nonatomic, retain) id fromValue;
@property (nonatomic, retain) id byValue;
@property (nonatomic, retain) id toValue;
@property (nonatomic, assign) NSUInteger numberOfBounces;
@property (nonatomic, assign) BOOL shouldOvershoot; //default YES
@property (nonatomic, assign) BOOL shake; //if shaking, set fromValue to the furthest value, and toValue to the current value
@property (nonatomic, assign) SKBounceAnimationStiffness stiffness;
+ (SKBounceAnimation*)animationWithKeyPath:(NSString*)keyPath;
@end