IOS中实现动画的几种方式

1.UIView首末式动画(实现渐变效果)

[UIView animateWithDuration:...]

在修改了自动布局的约束之后,执行下面代码实现动画效果 [UIView animateWithDuration:1.0 animations:^{
[添加了约束的view layoutIfNeeded];
}];

2.UIImageView的startAnimating系列方法播放帧动画。

3.当对非Root Layer的部分属性(可动画属性)进行修改时,默认会自动产生一些动画效果(隐式动画)

4.核心动画:

CABasicAnimation
CAKeyframeAnimation帧动画
CATransition转场动画(UIView也有转场动画)
CAAnimationGroup组动画

5.动图GIF实现

UIImage *image=[UIImage animatedImageWithImages: duration:];
posted @ 2015-03-02 08:38  coderkl  阅读(382)  评论(0编辑  收藏  举报