-(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:‘
我不知道是什么导致了这个错误,但是我的代码和所有其他教程和指南是一样的。
谢谢!
发布于 2011-09-03 05:42:40
该方法实际上是+animateWithDuration:delay:options:animations:completion:。你错过了completion:的部分。如果不需要补全块,可以只将nil传递给该参数。
https://stackoverflow.com/questions/7289473
复制相似问题