CKAnimationComponent Class Reference
Inherits from | CKCompositeComponent : CKComponent : NSObject |
---|---|
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.
+ (nullable instancetype)newWithComponent:(CKComponent *_Nullable)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.
+ (nullable instancetype)newWithComponent:(CKComponent *_Nullable)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.
+ (nullable instancetype)newWithComponent:(CKComponent *_Nullable)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