I am working with UIDynamicAnimator, UICollisionBehavior and several moving UIImageView.
It looks like this when everything is working fine. Pictures are moving on the screen without superposition.
But after I changed the bounds of some views, the collision doesn't update as it should and it gives me this:
The collision doesn't work anymore as expected: views became superposed.
I am updating the bounds with this code:
[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:
function doesn't seem to have effect on bounds changes... Am I right?