FTAnimationManager Class Reference
| 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
-
overshootThresholdThe 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
-
+ sharedManagerGet a reference to the FTAnimationManager singleton creating it if necessary.
Controlling animation timing
-
– delayStartOfAnimation:withDelay:Wraps a
CAAnimationin aCAAnimationGroupwhich will delay the start of the animation once it is added to aCALayer. -
– pauseAtEndOfAnimation:withDelay:Wraps a
CAAnimationin aCAAnimationGroupwhich will delay the firing of theanimationDidStop:finished:delegate method once the animation has stopped. -
– chainAnimations:run:Chains a sequence of animation objects to be run sequentially.
-
– animationGroupFor:withView:duration:delegate:startSelector:stopSelector:name:type:Groups a list of
CAAnimationsand associates them with view. All animations created by FTAnimationManager are ultimately created by this method.
Creating animation objects
-
– slideInAnimationFor:direction:duration:delegate:startSelector:stopSelector:Slides a view in from offscreen
-
– slideOutAnimationFor:direction:duration:delegate:startSelector:stopSelector:Slides a view offscreen
-
– slideInAnimationFor:direction:inView:duration:delegate:startSelector:stopSelector:Slides a view in from offscreen
-
– slideOutAnimationFor:direction:inView:duration:delegate:startSelector:stopSelector:Slides a view offscreen
-
– backOutAnimationFor:withFade:direction:duration:delegate:startSelector:stopSelector:Backs a view offscreen
-
– backInAnimationFor:withFade:direction:duration:delegate:startSelector:stopSelector:Backs a view in from offscreen
-
– backOutAnimationFor:withFade:direction:inView:duration:delegate:startSelector:stopSelector:Backs a view offscreen
-
– backInAnimationFor:withFade:direction:inView:duration:delegate:startSelector:stopSelector:Backs a view in from offscreen
-
– fadeAnimationFor:duration:delegate:startSelector:stopSelector:fadeOut:Aniamtes the
alphaof the view. -
– fadeBackgroundColorAnimationFor:duration:delegate:startSelector:stopSelector:fadeOut:Animates the
backgroundColorof the view. -
– popInAnimationFor:duration:delegate:startSelector:stopSelector:Pops a view in from offscreen
-
– popOutAnimationFor:duration:delegate:startSelector:stopSelector:Pops a view offscreen
-
– fallInAnimationFor:duration:delegate:startSelector:stopSelector:Shrinks and fades out view.
-
– fallOutAnimationFor:duration:delegate:startSelector:stopSelector:Shrinks and fades in view which starts scaled to double of its original size.
-
– flyOutAnimationFor:duration:delegate:startSelector:stopSelector:Scales up and fades out a view.
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 overshootThresholdDiscussion
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.hClass Methods
sharedManager
Get a reference to the FTAnimationManager singleton creating it if necessary.
+ (FTAnimationManager *)sharedManagerReturn Value
The singleton.
Discussion
Get a reference to the FTAnimationManager singleton creating it if necessary.
Declared In
FTAnimationManager.hInstance 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 *)typeParameters
- 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.hbackInAnimationFor: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)stopSelectorDiscussion
Backs a view in from offscreen
Declared In
FTAnimationManager.hbackInAnimationFor: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)stopSelectorDiscussion
Backs a view in from offscreen
Declared In
FTAnimationManager.hbackOutAnimationFor: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)stopSelectorDiscussion
Backs a view offscreen
Declared In
FTAnimationManager.hbackOutAnimationFor: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)stopSelectorDiscussion
Backs a view offscreen
Declared In
FTAnimationManager.hchainAnimations:run:
Chains a sequence of animation objects to be run sequentially.
- (CAAnimation *)chainAnimations:(NSArray *)animations run:(BOOL)runParameters
- animations
An array of animations to be run sequentially
- run
If
YES, the sequence begins immediately after this method returns. IfNO, you must add the returnedCAAnimationobject to aCALayerto 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.hdelayStartOfAnimation: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)delayTimeParameters
- 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.hfadeAnimationFor: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)fadeOutDiscussion
Aniamtes the alpha of the view.
Declared In
FTAnimationManager.hfadeBackgroundColorAnimationFor: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)fadeOutDiscussion
Animates the backgroundColor of the view.
Declared In
FTAnimationManager.hfallInAnimationFor:duration:delegate:startSelector:stopSelector:
Shrinks and fades out view.
- (CAAnimation *)fallInAnimationFor:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelectorDiscussion
Shrinks and fades out view.
Declared In
FTAnimationManager.hfallOutAnimationFor: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)stopSelectorDiscussion
Shrinks and fades in view which starts scaled to double of its original size.
Declared In
FTAnimationManager.hflyOutAnimationFor: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)stopSelectorDiscussion
Scales up and fades out a view.
Declared In
FTAnimationManager.hpauseAtEndOfAnimation: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)delayTimeParameters
- 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.hpopInAnimationFor: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)stopSelectorDiscussion
Pops a view in from offscreen
Declared In
FTAnimationManager.hpopOutAnimationFor:duration:delegate:startSelector:stopSelector:
Pops a view offscreen
- (CAAnimation *)popOutAnimationFor:(UIView *)view duration:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelectorDiscussion
Pops a view offscreen
Declared In
FTAnimationManager.hslideInAnimationFor: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)stopSelectorDiscussion
Slides a view in from offscreen
Declared In
FTAnimationManager.hslideInAnimationFor: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)stopSelectorDiscussion
Slides a view in from offscreen
Declared In
FTAnimationManager.hslideOutAnimationFor: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)stopSelectorDiscussion
Slides a view offscreen
Declared In
FTAnimationManager.hslideOutAnimationFor: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)stopSelectorDiscussion
Slides a view offscreen
Declared In
FTAnimationManager.h