我试图在三个UILabels (display1,display2,display3)上做一个交叉融合,使用块动画淡出,更改文本,然后一次淡入一个。我使用的代码是:
[UIView animateWithDuration:1.0 delay: 1.0
animations:^{
display1.alpha = 0.0;
display2.alpha = 0.0;
display3.alpha = 0.0;
}
completion:^{
[display1 setText:[NSString stringWithFormat:@"%@",[engine getstring]]];
[display2 setText:[NSString stringWithFormat:@"%@",[engine getstring]]];
[display3 setText:[NSString stringWithFormat:@"%@",[engine getstring]]];
[UIView animateWithDuration:1.0 delay:1.0
animations:^{
display1.alpha = 1.0;
[UIView animateWithDuration:1.0 delay:1.0
animations:^{
display2.alpha = 1.0;
[UIView animateWithDuration:1.0
delay:1.0
animations:^{
display3.alpha = 1.0;
} completion:nil];
} completion:nil];
} completion:nil];
}];我收到以下警告:
Method '+animateWithDuration:delay:animations:completion:' not found*和
'UIView' may not respond to method '+animateWithDuration:delay:animations:completion:'我使用的是Xcode4.0,iOS构建目标是4.3。
发布于 2011-07-18 13:59:34
您想要使用
+ animateWithDuration:delay:options:animations:completion:而不是。请注意中间的options:。
https://stackoverflow.com/questions/6729085
复制相似问题