view动画

[UIViewanimateWithDuration:2//执行时间

delay:0//延迟时间

usingSpringWithDamping:0.5f//阻尼有点像弹性0.0f/1.0f

initialSpringVelocity:25.0f//速度默认1.0f

options:UIViewAnimationOptionAutoreverse

animations:^{

m.layer.bounds=CGRectMake(0,0,100,100);

}completion:^(BOOLfinished) {

[self.eview.layerremoveAllAnimations]

];


正文:

UIViewAnimationOptionLayoutSubviews//提交动画的时候布局子控件,表示子控件将和父控件一同动画。

UIViewAnimationOptionAllowUserInteraction//动画时允许用户交流,比如触摸

UIViewAnimationOptionBeginFromCurrentState//从当前状态开始动画

UIViewAnimationOptionRepeat//动画无限重复

UIViewAnimationOptionAutoreverse//执行动画回路,前提是设置动画无限重复

UIViewAnimationOptionOverrideInheritedDuration//忽略外层动画嵌套的执行时间

UIViewAnimationOptionOverrideInheritedCurve//忽略外层动画嵌套的时间变化曲线

UIViewAnimationOptionAllowAnimatedContent//通过改变属性和重绘实现动画效果,如果key没有提交动画将使用快照

UIViewAnimationOptionShowHideTransitionViews//用显隐的方式替代添加移除图层的动画效果

UIViewAnimationOptionOverrideInheritedOptions//忽略嵌套继承的�选项

//时间函数曲线相关

UIViewAnimationOptionCurveEaseInOut//时间曲线函数,缓入缓出,中间快

UIViewAnimationOptionCurveEaseIn//时间曲线函数,由慢到特别快(缓入快出

UIViewAnimationOptionCurveEaseOut//时间曲线函数,由快到慢(快入缓出)

UIViewAnimationOptionCurveLinear//时间曲线函数,匀速

//转场动画相关的

UIViewAnimationOptionTransitionNone//无转场动画

UIViewAnimationOptionTransitionFlipFromLeft//转场从左翻转

UIViewAnimationOptionTransitionFlipFromRight//转场从右翻转

UIViewAnimationOptionTransitionCurlUp//上卷转场

UIViewAnimationOptionTransitionCurlDown//下卷转场

UIViewAnimationOptionTransitionCrossDissolve//转场交叉消失

UIViewAnimationOptionTransitionFlipFromTop//转场从上翻转

UIViewAnimationOptionTransitionFlipFromBottom//转场从下翻转

你可能感兴趣的:(view动画)