代码改变世界

iOS5.0中animation.timingFunction = UIViewAnimationCurveEaseInOut发送错误

2011-11-28 19:57  张智清  阅读(3868)  评论(0编辑  收藏  举报

在调试CATransition动画中发现animation.timingFunction = UIViewAnimationCurveEaseInOut;有错误提示:implict conversion of ‘int’ to ‘CAMediatimingFunction’ is disallowed with ARC。估计是因iOS5.0中在项目中使用了ARC,对以前的这种使用不再支持了。

修改为:

animation.timingFunction = [CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionEaseInEaseOut];