iOS 6.1 and Xcode 4.6, enumaration warning UIViewAnimationCurveEaseOut

丶灬走出姿态 提交于 2019-12-03 11:32:53

问题


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?


回答1:


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




回答2:


Replace UIViewAnimationCurveEaseOut into UIViewAnimationOptionCurveEaseOut

Eg:

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

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


来源:https://stackoverflow.com/questions/14615417/ios-6-1-and-xcode-4-6-enumaration-warning-uiviewanimationcurveeaseout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!