gpt4 book ai didi

ios - animateWithDuration 无法识别?

转载 作者:行者123 更新时间:2023-11-29 05:01:58 27 4
gpt4 key购买 nike

我正在尝试对三个 UILabel(display1、display2、display3)进行交叉溶解,方法是使用 block 动画淡出、更改文本,然后一次淡入一个。我使用的代码是:

[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:'

我使用的是 Xcode 4.0,iOS 构建目标为 4.3。

最佳答案

您想使用

+ animateWithDuration:delay:options:animations:completion:

相反。请注意中间的选项:

关于ios - animateWithDuration 无法识别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6729085/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com