尝试使用动画持续时间时找不到方法'+animateWithDuration:delay:options:animations:'


-(void)fadeLabel{
    UILabel *label = (UILabel *)[self.view viewWithTag:kLabelTag];

    [UIView animateWithDuration:2.0
                          delay:0.0
                        options:UIViewAnimationCurveEaseIn
                     animations:^{
                         label.alpha = 0.0;

                     }];

}

我第一次尝试动画给了我:方法'+animateWithDuration:delay:options:animations:'在尝试使用animateWithDuration

时未找到

我不知道是什么导致了这个错误,但是我的代码和所有其他教程和指南是一样的。

谢谢!

方法实际上是+animateWithDuration:delay:options:animations:completion:。你错过了completion:位。如果你不需要一个完成块,你可以把nil传递给那个参数。

相关内容

  • 没有找到相关文章

最新更新