API  1.0.0
CPAnimation Class Reference

#import <CPAnimation.h>

+ Inheritance diagram for CPAnimation:

Instance Methods

(CPAnimationCurve) - animationCurve
 
(void) - animationTimerDidFire:
 
(float) - currentProgress
 
(float) - currentValue
 
(id) - delegate
 
(CPTimeInterval) - duration
 
(float) - frameRate
 
(id) - initWithDuration:animationCurve:
 
(BOOL) - isAnimating
 
(void) - setAnimationCurve:
 
(void) - setCurrentProgress:
 
(void) - setDelegate:
 
(void) - setDuration:
 
(void) - setFrameRate:
 
(void) - startAnimation
 
(void) - stopAnimation
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(id) - init
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Additional Inherited Members

- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

Manages an animation. Contains timing and progress information.

Delegate Methods

-(BOOL)animationShouldStart:(CPAnimation)animation; Called at the beginning of -startAnimation.

Parameters
animationthe animation that will start
Returns
YES allows the animation to start. NO stops the animation.

-(void)animationDidEnd:(CPAnimation)animation; Called when an animation has completed.

Parameters
animationthe animation that completed

-(void)animationDidStop:(CPAnimation)animation; Called when the animation was stopped (before completing).

Parameters
animationthe animation that was stopped

- (float)animation:(CPAnimation)animation valueForProgress:(float)progress; The value from this method will be returned when CPAnimation's currentValue method is called.

Parameters
animationthe animation to obtain the curve value for
progressthe current animation progress
Returns
the curve value

Definition at line 2 of file CPAnimation.h.

Method Documentation

◆ animationCurve()

- (CPAnimationCurve) animationCurve
implementation

Returns the animation's pace

Definition at line 156 of file CPAnimation.j.

◆ animationTimerDidFire:()

- (void) animationTimerDidFire: (CPTimer aTimer
implementation

Definition at line 261 of file CPAnimation.j.

◆ currentProgress()

- (float) currentProgress
implementation

Returns the animation's progress

Definition at line 316 of file CPAnimation.j.

◆ currentValue()

- (float) currentValue
implementation

Returns the animation's timing progress.

Definition at line 324 of file CPAnimation.j.

◆ delegate()

- (id) delegate
implementation

Returns the animation's delegate

Definition at line 206 of file CPAnimation.j.

◆ duration()

- (CPTimeInterval) duration
implementation

Returns the length of the animation.

Definition at line 177 of file CPAnimation.j.

◆ frameRate()

- (float) frameRate
implementation

Returns the desired frame rate.

Definition at line 198 of file CPAnimation.j.

◆ initWithDuration:animationCurve:()

- (id) initWithDuration: (float)  aDuration
animationCurve: (CPAnimationCurve)  anAnimationCurve 
implementation

Initializes the animation with a duration and animation curve.

Parameters
aDurationthe length of the animation
anAnimationCurvedefines the animation's pace
Exceptions
CPInvalidArgumentExceptionif an invalid animation curve is specified

Definition at line 100 of file CPAnimation.j.

◆ isAnimating()

- (BOOL) isAnimating
implementation

Returns YES if the animation is running.

Definition at line 299 of file CPAnimation.j.

◆ setAnimationCurve:()

- (void) setAnimationCurve: (CPAnimationCurve)  anAnimationCurve
implementation

Sets the animation's pace.

Parameters
anAnimationCurvethe animation's pace
Exceptions
CPInvalidArgumentExceptionif an invalid animation curve is specified

Definition at line 121 of file CPAnimation.j.

◆ setCurrentProgress:()

- (void) setCurrentProgress: (float)  aProgress
implementation

Sets the animation's progress.

Parameters
aProgressthe animation's progress

Reimplemented in CPViewAnimation.

Definition at line 308 of file CPAnimation.j.

◆ setDelegate:()

- (void) setDelegate: (id <CPAnimationDelegate>)  aDelegate
implementation

Sets the animation's delegate.

Parameters
aDelegatethe new delegate

Definition at line 215 of file CPAnimation.j.

◆ setDuration:()

- (void) setDuration: (CPTimeInterval)  aDuration
implementation

Sets the animation's length.

Parameters
aDurationthe new animation length
Exceptions
CPInvalidArgumentExceptionif aDuration is negative

Definition at line 166 of file CPAnimation.j.

◆ setFrameRate:()

- (void) setFrameRate: (float)  frameRate
implementation

Sets the animation frame rate. This is not a guaranteed frame rate. 0 means to go as fast as possible.

Parameters
frameRatethe new desired frame rate
Exceptions
CPInvalidArgumentExceptionif frameRate is negative

Definition at line 187 of file CPAnimation.j.

◆ startAnimation()

- (void) startAnimation
implementation

Starts the animation. The method calls -animationShouldStart: on the delegate (if it implements it) to see if the animation should begin.

Reimplemented in CPViewAnimation.

Definition at line 241 of file CPAnimation.j.

◆ stopAnimation()

- (void) stopAnimation
implementation

Stops the animation before it has completed.

Reimplemented in CPViewAnimation.

Definition at line 284 of file CPAnimation.j.


The documentation for this class was generated from the following files: