我正在用这个动画移动两个 UIButton:
[UIView animateWithDuration:1.0
delay:0.0
options: UIViewAnimationCurveEaseInOut
animations:^{
self.ViewA.frame = CGRectMake(self.ViewA.frame.origin.x, self.ViewA.frame.origin.y - 174, self.ViewA.frame.size.width, self.ViewA.frame.size.height);
self.ViewB.frame = CGRectMake(self.ViewB.frame.origin.x, self.ViewB.frame.origin.y - 174, self.ViewB.frame.size.width, self.ViewB.frame.size.height);
}
completion:^(BOOL finished){
}];
但是当动画一直运行到用户将手指放在 UIButton 上时,如果他释放动画就会中断。有没有一种方法或什么东西可以确定何时发生这种情况并修复按钮的位置?