实现了一套自定义动画库
罗朝辉(http://blog.youkuaiyun.com/kesalin)
转载请注明出处
enum EaseType_ {
EaseType_None,
EaseType_In,
EaseType_Out,
EaseType_InOut,
};
typedef int EaseType;
enum AnimationType_ {
AnimationType_Linear,
AnimationType_Bounce,
AnimationType_Back,
AnimationType_Quartic,
AnimationType_Quintic,
AnimationType_Circular,
AnimationType_Cubic,
AnimationType_Quadratic,
AnimationType_Sinusoidal,
AnimationType_Elastic,
};
typedef int AnimationType;
使用例子:
// setup animation
//
propertyValue.duration = duration;
propertyValue.easeType = EaseType_Out;
propertyValue.animationType = AnimationType_Back;
// AnimationType_Elastic
// AnimationType_Back
// AnimationType_Bounce
// start animation
[propertyValue setValue:targetValue];
带回滚效果的旋转 Pie 图:

带 Bounce效果的旋转菜单图:

有空了再整理实现思路,详细写篇文章,放出源码来。
自定义iOS动画库
本文介绍了一款在iOS平台上实现的自定义动画库,该库支持任何数值型变量的自动动画展示并提供多种动画效果。文章列举了所支持的动画类型,并通过示例展示了如何配置动画属性。

被折叠的 条评论
为什么被折叠?



