![]() |
API 0.9.5
|
#import <CPViewAnimation.h>
Inheritance diagram for CPViewAnimation:Instance Methods | |
| (id) | - initWithViewAnimations: |
| (void) | - setCurrentProgress: |
| (void) | - setViewAnimations: |
| (void) | - startAnimation |
| (void) | - stopAnimation |
| (CPArray) | - viewAnimations |
CPViewAnimation is a subclass of CPAnimation that makes it easy to do basic animations on views.
Definition at line 2 of file CPViewAnimation.h.
| - (id) initWithViewAnimations: | (CPArray) | viewAnimations |
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 = [CPDictionary dictionaryWithObjects:[myViewToAnimate, aStartFrame, anEndFrame, CPViewAnimationFadeInEffect]
forKeys:[CPViewAnimationTargetKey, CPViewAnimationStartFrameKey, CPViewAnimationEndFrameKey, CPViewAnimationEffectKey]];
If you pass nil instead of an array of dictionaries you should later call setViewAnimations:.
| viewAnimations | - An array of CPDictionaries for each animation. |
Definition at line 68 of file CPViewAnimation.j.
| - (void) setCurrentProgress: | (CPAnimationProgress) | progress |
Definition at line 102 of file CPViewAnimation.j.
| - (void) setViewAnimations: | (CPArray) | viewAnimations |
Takes an array of CPDictionaries as documented in initWithViewAnimations:.
| viewAnimations | - An array of dictionaries describing the animation. |
Definition at line 219 of file CPViewAnimation.j.
| - (void) startAnimation |
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 78 of file CPViewAnimation.j.
| - (void) stopAnimation |
Stops the animation before it has completed.
Reimplemented from CPAnimation.
Definition at line 141 of file CPViewAnimation.j.
| - (CPArray) viewAnimations |
Definition at line 209 of file CPViewAnimation.j.