forked from core-plot/core-plot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCPTAnimationOperation.m
More file actions
103 lines (83 loc) · 2.67 KB
/
CPTAnimationOperation.m
File metadata and controls
103 lines (83 loc) · 2.67 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#import "CPTAnimationOperation.h"
#import "CPTAnimationPeriod.h"
/** @brief Describes all aspects of an animation operation, including the value range, duration, animation curve, property to update, and the delegate.
**/
@implementation CPTAnimationOperation
/** @property CPTAnimationPeriod *period
* @brief The start value, end value, and duration of this animation operation.
**/
@synthesize period;
/** @property CPTAnimationCurve animationCurve
* @brief The animation curve used to animate this operation.
**/
@synthesize animationCurve;
/** @property id boundObject
* @brief The object to update for each animation frame.
**/
@synthesize boundObject;
/** @property SEL boundGetter
* @brief The @ref boundObject getter method for the property to update for each animation frame.
**/
@synthesize boundGetter;
/** @property SEL boundSetter
* @brief The @ref boundObject setter method for the property to update for each animation frame.
**/
@synthesize boundSetter;
/** @property cpt_weak id<CPTAnimationDelegate>delegate
* @brief The animation delegate.
**/
@synthesize delegate;
/** @property BOOL canceled
* @brief If @YES, this animation operation has been canceled and will no longer post updates.
**/
@synthesize canceled;
/** @property id<NSCopying, NSObject> identifier
* @brief An object used to identify the layer in collections.
**/
@synthesize identifier;
/** @property NSDictionary *userInfo
* @brief Application-specific user info that can be attached to the operation.
**/
@synthesize userInfo;
/// @name Initialization
/// @{
/** @brief Initializes a newly allocated CPTAnimationOperation object.
*
* This is the designated initializer. The initialized object will have the following properties:
* - @ref period = @nil
* - @ref animationCurve = #CPTAnimationCurveDefault
* - @ref boundObject = @nil
* - @ref boundGetter = @NULL
* - @ref boundSetter = @NULL
* - @ref delegate = @nil
* - @ref canceled = @NO
* - @ref identifier = @nil
* - @ref userInfo = @nil
*
* @return The initialized object.
**/
-(instancetype)init
{
if ( (self = [super init]) ) {
period = nil;
animationCurve = CPTAnimationCurveDefault;
boundObject = nil;
boundGetter = NULL;
boundSetter = NULL;
delegate = nil;
canceled = NO;
identifier = nil;
userInfo = nil;
}
return self;
}
/// @}
#pragma mark -
#pragma mark Description
/// @cond
-(NSString *)description
{
return [NSString stringWithFormat:@"<%@ animate %@ %@ with period %@>", [super description], self.boundObject, NSStringFromSelector(self.boundGetter), self.period];
}
/// @endcond
@end