iOS 6.1和Xcode 4.6,枚举警告UIViewAnimationCurve EaseOut

时间:2013-01-30 22:53:16

标签: iphone ios enums xcode4.6

我已经安装了新的iOS 6.1和Xcode 4.6,现在我的代码中有一些枚举警告,我无法解决这个问题:

[UIView animateWithDuration:0.4
                          delay:0.0
                        options:UIViewAnimationCurveEaseOut
                     animations:^{

                     } completion:^(BOOL finished) {}];

这是警告:

Implicit conversion from enumeration type 'enum UIViewAnimationCurve' to different enumeration type 'UIViewAnimationOptions' (aka 'enum UIViewAnimationOptions')

我怎么能解决这个警告?

2 个答案:

答案 0 :(得分:100)

您使用了错误的选项值。试试UIViewAnimationOptionCurveEaseOut

答案 1 :(得分:1)

UIViewAnimationCurveEaseOut替换为UIViewAnimationOptionCurveEaseOut

例如:

[UIView animateWithDuration:0.4
                          delay:0.0
                        UIViewAnimationOptionCurveEaseOut
                     animations:^{

                     } completion:^(BOOL finished) {}];