API  1.0.0
CPViewAnimation Class Reference

#import <CPViewAnimation.h>

+ Inheritance diagram for CPViewAnimation:

Instance Methods

(id) - initWithViewAnimations:
 
(void) - startAnimation
 
(void) - setCurrentProgress:
 
(void) - stopAnimation
 
(CPArray) - viewAnimations
 
(void) - setViewAnimations:
 
- Instance Methods inherited from CPAnimation
(CPAnimationCurve) - animationCurve
 
(void) - animationTimerDidFire:
 
(float) - currentProgress
 
(float) - currentValue
 
(id) - delegate
 
(CPTimeInterval) - duration
 
(float) - frameRate
 
(id) - initWithDuration:animationCurve:
 
(BOOL) - isAnimating
 
(void) - setAnimationCurve:
 
(void) - setDelegate:
 
(void) - setDuration:
 
(void) - setFrameRate:
 
- 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

CPViewAnimation is a subclass of CPAnimation that makes it easy to do basic animations on views.

Definition at line 2 of file CPViewAnimation.h.

Method Documentation

◆ initWithViewAnimations:()

- (id) initWithViewAnimations: (CPArray)  viewAnimations
implementation

Designated initializer.

This method takes an array of CPDictionaries. Each dictionary should contain values for the following keys:

CPViewAnimationTargetKey - (Required) The view to animate.
CPViewAnimationStartFrameKey - (Optional) The start frame of the target.
CPViewAnimationEndFrameKey - (Optional) The end frame of the target.
CPViewAnimationEffectKey - (Optional) a fade effect to use for the animation.

For example:

var animation =
        CPViewAnimationTargetKey: myViewToAnimate,
        CPViewAnimationStartFrameKey: aStartFrame,
        CPViewAnimationEndFrameKey: anEndFrame,
        CPViewAnimationEffectKey: CPViewAnimationFadeInEffect,
    };

If you pass nil instead of an array of dictionaries you should later call setViewAnimations:.

Parameters
viewAnimations- An array of CPDictionaries for each animation.

Definition at line 71 of file CPViewAnimation.j.

◆ setCurrentProgress:()

- (void) setCurrentProgress: (float)  aProgress
implementation

Sets the animation's progress.

Parameters
aProgressthe animation's progress

Reimplemented from CPAnimation.

Definition at line 105 of file CPViewAnimation.j.

◆ setViewAnimations:()

- (void) setViewAnimations: (CPArray)  viewAnimations
implementation

Takes an array of CPDictionaries as documented in initWithViewAnimations:.

Parameters
viewAnimations- An array of dictionaries describing the animation.

Definition at line 222 of file CPViewAnimation.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 from CPAnimation.

Definition at line 81 of file CPViewAnimation.j.

◆ stopAnimation()

- (void) stopAnimation
implementation

Stops the animation before it has completed.

Reimplemented from CPAnimation.

Definition at line 144 of file CPViewAnimation.j.

◆ viewAnimations()

- (CPArray) viewAnimations
implementation

Definition at line 212 of file CPViewAnimation.j.


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