CocoaDev

Edit AllPages

The following is from http://www.lucasnewman.com/iphone/

General/UIAnimation

An abstract superclass used to animate properties of a General/UIView. It is supported by a collection concrete subclasses provided for the alpha, frame, scroll position, affine transformation (including a special subclass for rotation), and zooming.

typedef enum { kUIAnimationCurveEaseInEaseOut, kUIAnimationCurveEaseIn, kUIAnimationCurveEaseOut, kUIAnimationCurveLinear, } General/UIAnimationCurve;

// Creating animations

- (id)initWithTarget:(id)target;

// Properties

- (id)target;

- (void)setDelegate:(id)delegate;

- (id)delegate;

- (void)setAction:(SEL)action;

- (SEL)action;

- (void)setAnimationCurve:(General/UIAnimationCurve)animationCurve;

- (float)progressForFraction:(float)fraction;

// Implemented by subclasses

- (void)setProgress:(float)progress;

// Controlling animations

- (void)stopAnimation;


Provided General/UIAnimation subclasses:

General/UIAlphaAnimation

- (void)setStartAlpha:(float)alpha;

- (void)setEndAlpha:(float)alpha;

- (float)alphaForFraction:(float)fraction;

General/UIFrameAnimation

- (void)setStartFrame:(General/CGRect)frame;

- (void)setEndFrame:(General/CGRect)frame;

- (General/CGRect)endFrame;

General/UIRotationAnimation

- (void)setStartRotationAngle:(float)angle;

- (void)setEndRotationAngle:(float)angle;

General/UIScrollAnimation

- (void)setStartPoint:(General/CGPoint)startPoint;

- (void)setEndPoint:(General/CGPoint)endPoint;

General/UITransformAnimation

- (void)setStartTransform:(General/CGAffineTransform)transform;

- (void)setEndTransform:(General/CGAffineTransform)transform;

- (General/CGAffineTransform)transformForFraction:(float)fraction;

General/UIZoomAnimation

+ (float)defaultDuration;

+ (id)zoomAnimationForTarget:(id)target endScale:(float)scale endScrollPoint:(General/CGPoint)point;

+ (id)zoomAnimationForTarget:(id)target focusRect:(General/CGRect)focusRect deviceBoundaryRect:(General/CGRect)deviceBoundaryRect scale:(float)scale;

- (void)setEndScale:(float)scale;

- (void)setStartScale:(float)scale;

- (void)setEndScrollPoint:(General/CGPoint)point;

- (void)setStartScrollPoint:(General/CGPoint)point;


General/UIAnimator

General/UIAnimator provides a shared controller for starting and stopping global animations.

+ (id)sharedAnimator;

+ (void)disableAnimation;

+ (void)enableAnimation;

- (void)addAnimation:(General/UIAnimation *)animation withDuration:(double)duration start:(BOOL)start;

- (void)addAnimations:(General/NSArray *)animations withDuration:(double)duration start:(BOOL)start;

- (void)removeAnimationsForTarget:(id)target;

- (void)removeAnimationsForTarget:(id)target ofKind:(Class)classOfTarget;

- (void)startAnimation:(General/UIAnimation *)animation;

- (void)stopAnimation:(General/UIAnimation *)animation;

- (float)fractionForAnimation:(General/UIAnimation *)animation;


General/UIView (Animation)

This category on General/UIView allows adding General/UIAnimations to the view, and also allows modifying global animation parameters.

+ (void)beginAnimations:(General/NSArray *)animations;

+ (void)endAnimations;

+ (void)enableAnimation;

+ (void)disableAnimation;

+ (void)setAnimationAutoreverses:(BOOL)autoreverses;

+ (void)setAnimationCurve:(General/UIAnimationCurve)animationCurve;

+ (void)setAnimationDelay:(double)startDelay;

+ (void)setAnimationDelegate:(id)delegate;

+ (void)setAnimationDuration:(double)duration;

+ (void)setAnimationFrameInterval:(double)minimumTimeIntervalBetweenFrames;

+ (void)setAnimationFromCurrentState:(BOOL)shouldAnimateFromCurrentState;

+ (void)setAnimationPosition:(General/CGPoint)position;

+ (void)setAnimationStartTime:(double)startTime;

+ (void)setAnimationRepeatCount:(float)repeatCount;

+ (void)setAnimationRoundsToInteger:(BOOL)shouldRoundToInteger;

+ (void)setAnimationWillStartSelector:(SEL)willStartSelector;

+ (void)setAnimationDidStopSelector:(SEL)willEndSelector;

- (void)addAnimation:(General/UIAnimation *)animation forKey:(General/NSString *)key;