iOS 6.1 and Xcode 4.6, enumaration warning UIViewA

2020-05-24 19:56发布

i have installed the new iOS 6.1 and Xcode 4.6, and now i have some warning of enumeration in my code, i can't resolve this:

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

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

and this is the warning:

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

how i can solve this warning?

2条回答
走好不送
2楼-- · 2020-05-24 20:07

You're using the wrong option value. Try UIViewAnimationOptionCurveEaseOut.

查看更多
不美不萌又怎样
3楼-- · 2020-05-24 20:11

Replace UIViewAnimationCurveEaseOut into UIViewAnimationOptionCurveEaseOut

Eg:

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

                     } completion:^(BOOL finished) {}];
查看更多
登录 后发表回答