我正在使用UIDynamicAnimator,UICollisionBehavior和几个正在移动的UIImageView。 它看起来像这样,当一切工作正常。图片在屏幕上移动而不叠加。 当视图边界发生变化时发生碰撞
但之后我改变了一些看法界限,碰撞不更新,因为它应该和它给了我这样的:
预期的碰撞不工作了:观点成为叠加。
我更新的范围与此代码:
[UIView animateWithDuration:2
delay:0
options:UIViewAnimationOptionCurveEaseInOut
animations:^{
CGRect newBounds = imageView.bounds;
newBounds.size.height = 500;
newBounds.size.width = 500;
imageView.bounds = newBounds;
}
completion:^(BOOL finished) {
[animator updateItemUsingCurrentState:imageView];
}];
updateItemUsingCurrentState:
功能似乎并没有对界限变化的影响......我说得对不对?
我想我已经尝试过,但没有成功...我会再试一次尽快并给你反馈。谢谢。 – Tulleb