This is a scaffold library and the aid of the project is providing all foundation functions for IOS
developer to build app easier.
Animation helper provides easy way to set CALayer value animatingly, and it also provides the some frequent animation effects, such as shake, flash, and etc.
Express animation extends UIView animation function for providing common animations.
[demo A_AnimationEffect:
A_AnimationEffectType_flash];
[demo A_AnimationEffect:
A_AnimationEffectType_pulse];
[demo A_AnimationEffect:
A_AnimationEffectType_shakeHorizontal];
[demo A_AnimationEffect:
A_AnimationEffectType_shakeVertical];
[demo A_AnimationEffect:
A_AnimationEffectType_swing];
[demo A_AnimationEffect:
A_AnimationEffectType_wobble];
[demo A_AnimationEffect:
A_AnimationEffectType_quake];
[demo A_AnimationEffect:
A_AnimationEffectType_squeeze];
[demo A_AnimationEffect:
A_AnimationEffectType_flipX];
[demo A_AnimationEffect:
A_AnimationEffectType_flipY];
[demo A_AnimationEffect:
A_AnimationEffectType_flipLeft];
[demo A_AnimationEffect:
A_AnimationEffectType_flipRight];
Here is the express animations for show-in and show-out.
[demo A_AnimationEffect:
A_AnimationEffectType_flipOutX
Duration:.5f
CompletionBlock:^{
[demo A_AnimationEffect:
A_AnimationEffectType_flipInX];
}];
[demo A_AnimationEffect:
A_AnimationEffectType_flipOutY
Duration:.5f
CompletionBlock:^{
[demo A_AnimationEffect:
A_AnimationEffectType_flipInY];
}];
[demo A_AnimationEffect:
A_AnimationEffectType_fadeOut
Duration:.5f
CompletionBlock:^{
[demo A_AnimationEffect:
A_AnimationEffectType_fadeIn];
}];
[demo A_AnimationEffect:
A_AnimationEffectType_zoomOut
Duration:.5f
CompletionBlock:^{
[demo A_AnimationEffect:
A_AnimationEffectType_zoomIn];
}];
[demo A_AnimationEffect:
A_AnimationEffectType_cardOut
Duration:.5f
CompletionBlock:^{
[demo A_AnimationEffect:
A_AnimationEffectType_cardIn];
}];
CALayer category offers a easy way to set all kind of layer's properties with different animation motion pattern.
Enumeration name and function diagrams, a part of them reference to easings.net
A_AnimationType_default
A_AnimationType_spring
A_AnimationType_longSpring
A_AnimationType_bigSpring
A_AnimationType_bigLongSpring
A_AnimationType_easeInSine
A_AnimationType_easeOutSine
A_AnimationType_easeInOutSine
A_AnimationType_easeInQuad
A_AnimationType_easeOutQuad
A_AnimationType_easeInOutQuad
A_AnimationType_easeInCubic
A_AnimationType_easeOutCubic
A_AnimationType_easeInOutCubic
A_AnimationType_easeInQuart
A_AnimationType_easeOutQuart
A_AnimationType_easeInOutQuart
A_AnimationType_easeInQuint
A_AnimationType_easeOutQuint
A_AnimationType_easeInOutQuint
A_AnimationType_easeInExpo
A_AnimationType_easeOutExpo
A_AnimationType_easeInOutExpo
A_AnimationType_easeInCirc
A_AnimationType_easeOutCirc
A_AnimationType_easeInOutCirc
A_AnimationType_easeInElastic
A_AnimationType_easeOutElastic
A_AnimationType_easeInOutElastic
A_AnimationType_easeInBack
A_AnimationType_easeOutBack
A_AnimationType_easeInOutBack
A_AnimationType_easeInBounce
A_AnimationType_easeOutBounce
A_AnimationType_easeInOutBounce
Setting properties of CALayer with animations
[demo.layer A_AnimationSetPositionX:240.0f
AnimtionType:A_AnimationType_easeOutExpo];
[demo.layer A_AnimationSetPositionX:240.0f
AnimtionType:A_AnimationType_easeOutBounce];
[demo.layer A_AnimationSetPositionX:240.0f
AnimtionType:A_AnimationType_easeOutElastic];
[demo.layer A_AnimationSetPositionX:240.0f
AnimtionType:A_AnimationType_bigLongSpring];
[demo.layer A_AnimationSet:@"position.y"
AnimtionType:A_AnimationType_spring
Start:@(0)
End:@(200)
Duration:1.2f
FPS:A_AnimationFPS_high];
[demo A_AnimationEffect:A_AnimationEffectType_squeeze Repeat:4 Duration:.3f CompletionBlock:^{
[demo.layer A_AnimationSetRotationZ:3.0f AnimtionType: A_AnimationType_easeOutBounce];
[demo.layer A_AnimationSetScale:0.8f AnimtionType:A_AnimationType_easeInOutSine];
}];