方法'+ animateWithDuration:delay:options:animations:'尝试使用animateWithDuration时找不到

Ada*_*dam 3 iphone cocoa-touch ios4 ios

-(void)fadeLabel{

    UILabel *label = (UILabel *)[self.view viewWithTag:kLabelTag];


    [UIView animateWithDuration:2.0
                          delay:0.0
                        options:UIViewAnimationCurveEaseIn
                     animations:^{

                         label.alpha = 0.0;


                     }];



}
Run Code Online (Sandbox Code Playgroud)

我第一次尝试动画任何东西给了我:方法'+ animateWithDuration:delay:options:animations:'尝试使用animateWithDuration时找不到

我不知道导致此错误的原因,但我的代码与所有其他教程和指南相同.

谢谢!

Lil*_*ard 5

实际上这个方法+animateWithDuration:delay:options:animations:completion:.你错过了completion:一点.nil如果您不需要完成块,则可以传递给该参数.