出于某种原因,如果我只使用代码:
[UIView animateWithDuration:.5 delay:0
options:UIViewAnimationOptionCurveEaseInOut
animations:^{
CGRect newDescriptFrame = [self.summaryTextField frame];
newDescriptFrame.size.height = (bkgndRect.size.height - kbSize.height) - ((newDescriptFrame.origin.y) + 10);
self.descriptionTextView.frame = newDescriptFrame;
}
completion:^(BOOL finished){
}];
它移动descriptionTextView
就好了,但如果我再加上另一个动画块。
[UIView animateWithDuration:.3 delay:.5
options:UIViewAnimationOptionCurveEaseInOut
animations:^{
self.summaryLabel.alpha = 0.0;
self.summaryLabel.alpha = 1.0;
}
completion:^(BOOL finished){}];
当第二个块动画时,descriptionTextView
恢复到动画前的原始位置。为什么会这样?我如何解决它?如果我在帧更改的同一块中移动alpha更改。它根本没有为帧变化设置动画。
答案 0 :(得分:0)
不是因为在同一时刻只能执行一个动画吗?也就是说,如果您在一个代码块中放置两个动画,则只会实际执行最后一个动画。