0
我運動二UIButtons以該動畫:的UIView動畫中斷IOS
[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他的手指,如果他釋放動畫被中斷。有沒有一種方法或什麼來確定這種情況何時發生並確定按鈕的位置?
你在哪裏調用這段代碼? –
in if([(UIPanGestureRecognizer *)sender state] == UIGestureRecognizerStateBegan){ – user2014474
你打斷什麼意思?怎麼了? – rdelmar