CKAnimationComponent Class Reference

Inherits from CKCompositeComponent
Declared in CKAnimationComponent.h

Overview

@c CKAnimationComponent is a wrapper component similar to @c CKCompositeComponent, which allows developers to specify animations to be used as an initial mount animation and / or a final unmount animation. It can be used to provide animations to any component, even if it doesn’t have a scope and / or a view.

Instead of overriding a corresponding animation method in a component subclass or storing a reference to a child component in the parent in order to return an animation for it from one of the animation methods later, you just pass the component you want to animate to @c CKAnimationComponent initialiser:

@code auto const anyComponent = [AnyComponent newWith…]; [CKAnimationComponent newWithComponent:anyComponent onInitialMount:CK::Animation::alphaFrom(0) onFinalUnmount:CK::Animation::alphaTo(0)];

+ newWithComponent:onInitialMount:

Component to animate.

+ (instancetype)newWithComponent:(CKComponent *)component onInitialMount:(CK : : Animation : : Initial)initial

Parameters

component

Component to animate.

initial

Animation that will be applied to the component when it is first mounted.

Declared In

CKAnimationComponent.h

+ newWithComponent:onFinalUnmount:

Component to animate.

+ (instancetype)newWithComponent:(CKComponent *)component onFinalUnmount:(CK : : Animation : : Final)final

Parameters

component

Component to animate.

final

Animation that will be applied to the component when it is no longer in the mounted hierarchy.

Declared In

CKAnimationComponent.h

+ newWithComponent:onInitialMount:onFinalUnmount:

Component to animate.

+ (instancetype)newWithComponent:(CKComponent *)component onInitialMount:(CK : : Animation : : Initial)initial onFinalUnmount:(CK : : Animation : : Final)final

Parameters

component

Component to animate.

initial

Animation that will be applied to the component when it is first mounted.

final

Animation that will be applied to the component when it is no longer in the mounted hierarchy.

Declared In

CKAnimationComponent.h

+ newWithView:component:

Passed to CKComponent’s initializer. This should be used sparingly for CKCompositeComponent. Prefer delegating view configuration completely to the child component to hide implementation details.

+ (instancetype)newWithView:(const CKComponentViewConfiguration &)view component:(CKComponent *)component

Parameters

view

Passed to CKComponent’s initializer. This should be used sparingly for CKCompositeComponent. Prefer delegating view configuration completely to the child component to hide implementation details.

component

The component the composite component uses for layout and sizing.

Declared In

CKCompositeComponent.h

+ newWithComponent:

Calls the initializer with {} for view.

+ (instancetype)newWithComponent:(CKComponent *)component

Declared In

CKCompositeComponent.h