Inherits from NSObject
Declared in FTAnimationManager.h

Overview

The FTAnimationManager class is the heart of the FTUtils Core Animation utilities. It is meant to be used as a singleton. Developers should avoid creating mulitple instances and should get a reference to an instance via the sharedManager class method.

Tasks

Other Methods

  •   overshootThreshold

    The maximum value (in points) that the bouncing animations will travel past their end value before coming to rest. The default is 10.0.

    property

Accessing the animation manager

Controlling animation timing

Creating animation objects

Properties

overshootThreshold

The maximum value (in points) that the bouncing animations will travel past their end value before coming to rest. The default is 10.0.

@property (assign) CGFloat overshootThreshold

Discussion

The maximum value (in points) that the bouncing animations will travel past their end value before coming to rest. The default is 10.0.

Declared In

FTAnimationManager.h

Class Methods

sharedManager

Get a reference to the FTAnimationManager singleton creating it if necessary.

+ (FTAnimationManager *)sharedManager

Return Value

The singleton.

Discussion

Get a reference to the FTAnimationManager singleton creating it if necessary.

Declared In

FTAnimationManager.h

Instance Methods

animationGroupFor:withView:duration:delegate:startSelector:stopSelector:name:type:

Groups a list of CAAnimations and associates them with view. All animations created by FTAnimationManager are ultimately created by this method.

- (CAAnimationGroup *)animationGroupFor:(NSArray *)animations withView:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector name:(NSString *)name type:(NSString *)type

Parameters

animations

A list of animations to group together.

view

The target view for the animations.

duration

The duration (in seconds) of the returned animation group.

delegate

An optional delegate to send animation start and stop messages to.

startSelector

An optional selector to be called on delegate when the animation starts.

stopSelector

An optional selector to be called on delegate when the animation stops.

name

A unique name used as a key internally to store and retrieve this animation object.

type

Either kFTAnimationTypeIn or kFTAnimationTypeOut to denote whether this animation is designed to show or hide its associated view.

Discussion

Groups a list of CAAnimations and associates them with view. All animations created by FTAnimationManager are ultimately created by this method.

Declared In

FTAnimationManager.h

backInAnimationFor:withFade:direction:duration:delegate:startSelector:stopSelector:

Backs a view in from offscreen

- (CAAnimation *)backInAnimationFor:(UIView *)view withFade:(BOOL)fade direction:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Backs a view in from offscreen

Declared In

FTAnimationManager.h

backInAnimationFor:withFade:direction:inView:duration:delegate:startSelector:stopSelector:

Backs a view in from offscreen

- (CAAnimation *)backInAnimationFor:(UIView *)view withFade:(BOOL)fade direction:(FTAnimationDirection)direction inView:(UIView *)enclosingView duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Backs a view in from offscreen

Declared In

FTAnimationManager.h

backOutAnimationFor:withFade:direction:duration:delegate:startSelector:stopSelector:

Backs a view offscreen

- (CAAnimation *)backOutAnimationFor:(UIView *)view withFade:(BOOL)fade direction:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Backs a view offscreen

Declared In

FTAnimationManager.h

backOutAnimationFor:withFade:direction:inView:duration:delegate:startSelector:stopSelector:

Backs a view offscreen

- (CAAnimation *)backOutAnimationFor:(UIView *)view withFade:(BOOL)fade direction:(FTAnimationDirection)direction inView:(UIView *)enclosingView duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Backs a view offscreen

Declared In

FTAnimationManager.h

chainAnimations:run:

Chains a sequence of animation objects to be run sequentially.

- (CAAnimation *)chainAnimations:(NSArray *)animations run:(BOOL)run

Parameters

animations

An array of animations to be run sequentially

run

If YES, the sequence begins immediately after this method returns. If NO, you must add the returned CAAnimation object to a CALayer to begin the sequence.

Discussion

Chains a sequence of animation objects to be run sequentially.

Important: The animation chaining only works with animations created with one of the FTAnimationManager animations. If you want to sequence your own CAAnimation objects, you must wrap each of them with the animationGroupFor:withView:duration:delegate:startSelector:stopSelector:name:type: method.

Declared In

FTAnimationManager.h

delayStartOfAnimation:withDelay:

Wraps a CAAnimation in a CAAnimationGroup which will delay the start of the animation once it is added to a CALayer.

- (CAAnimationGroup *)delayStartOfAnimation:(CAAnimation *)animation withDelay:(CFTimeInterval)delayTime

Parameters

animation

The animation to be delayed

delayTime

The duration (in seconds) of the delay

Discussion

Wraps a CAAnimation in a CAAnimationGroup which will delay the start of the animation once it is added to a CALayer.

Declared In

FTAnimationManager.h

fadeAnimationFor:duration:delegate:startSelector:stopSelector:fadeOut:

Aniamtes the alpha of the view.

- (CAAnimation *)fadeAnimationFor:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector fadeOut:(BOOL)fadeOut

Discussion

Aniamtes the alpha of the view.

Declared In

FTAnimationManager.h

fadeBackgroundColorAnimationFor:duration:delegate:startSelector:stopSelector:fadeOut:

Animates the backgroundColor of the view.

- (CAAnimation *)fadeBackgroundColorAnimationFor:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector fadeOut:(BOOL)fadeOut

Discussion

Animates the backgroundColor of the view.

Declared In

FTAnimationManager.h

fallInAnimationFor:duration:delegate:startSelector:stopSelector:

Shrinks and fades out view.

- (CAAnimation *)fallInAnimationFor:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Shrinks and fades out view.

Declared In

FTAnimationManager.h

fallOutAnimationFor:duration:delegate:startSelector:stopSelector:

Shrinks and fades in view which starts scaled to double of its original size.

- (CAAnimation *)fallOutAnimationFor:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Shrinks and fades in view which starts scaled to double of its original size.

Declared In

FTAnimationManager.h

flyOutAnimationFor:duration:delegate:startSelector:stopSelector:

Scales up and fades out a view.

- (CAAnimation *)flyOutAnimationFor:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Scales up and fades out a view.

Declared In

FTAnimationManager.h

pauseAtEndOfAnimation:withDelay:

Wraps a CAAnimation in a CAAnimationGroup which will delay the firing of the animationDidStop:finished: delegate method once the animation has stopped.

- (CAAnimationGroup *)pauseAtEndOfAnimation:(CAAnimation *)animation withDelay:(CFTimeInterval)delayTime

Parameters

animation

The animation to be delayed

delayTime

The duration (in seconds) of the delay

Discussion

Wraps a CAAnimation in a CAAnimationGroup which will delay the firing of the animationDidStop:finished: delegate method once the animation has stopped.

Declared In

FTAnimationManager.h

popInAnimationFor:duration:delegate:startSelector:stopSelector:

Pops a view in from offscreen

- (CAAnimation *)popInAnimationFor:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Pops a view in from offscreen

Declared In

FTAnimationManager.h

popOutAnimationFor:duration:delegate:startSelector:stopSelector:

Pops a view offscreen

- (CAAnimation *)popOutAnimationFor:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Pops a view offscreen

Declared In

FTAnimationManager.h

slideInAnimationFor:direction:duration:delegate:startSelector:stopSelector:

Slides a view in from offscreen

- (CAAnimation *)slideInAnimationFor:(UIView *)view direction:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Slides a view in from offscreen

Declared In

FTAnimationManager.h

slideInAnimationFor:direction:inView:duration:delegate:startSelector:stopSelector:

Slides a view in from offscreen

- (CAAnimation *)slideInAnimationFor:(UIView *)view direction:(FTAnimationDirection)direction inView:(UIView *)enclosingView duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Slides a view in from offscreen

Declared In

FTAnimationManager.h

slideOutAnimationFor:direction:duration:delegate:startSelector:stopSelector:

Slides a view offscreen

- (CAAnimation *)slideOutAnimationFor:(UIView *)view direction:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Slides a view offscreen

Declared In

FTAnimationManager.h

slideOutAnimationFor:direction:inView:duration:delegate:startSelector:stopSelector:

Slides a view offscreen

- (CAAnimation *)slideOutAnimationFor:(UIView *)view direction:(FTAnimationDirection)direction inView:(UIView *)enclosingView duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector

Discussion

Slides a view offscreen

Declared In

FTAnimationManager.h