-(void)fadeLabel{
UILabel *label = (UILabel *)[self.view viewWithTag:kLabelTag];
[UIView animateWithDuration:2.0
delay:0.0
options:UIViewAnimationCurveEaseIn
animations:^{
label.alpha = 0.0;
}];
}
我第一次尝试制作任何东西的动画给了我: 尝试使用 animateWithDuration 时找不到方法“+animateWithDuration:delay:options:animations:”
我不知道导致此错误的原因,但我的代码与所有其他教程和指南相同。
谢谢!
最佳答案
方法其实就是+animateWithDuration:delay:options:animations:completion:
。您缺少 completion:
位。如果您不需要完成 block ,您可以将 nil
传递给该参数。
关于iphone - 尝试使用 animateWithDuration 时找不到方法 '+animateWithDuration:delay:options:animations:',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7289473/