Scale an image every time it collide with another
- by jean mayot
here is my code :
-(void)collision{
if(CGRectIntersectsRect(imageView.frame,centre.frame)){
imageView.alpha=0;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0f];
centre.transform=CGAffineTransformMakeScale(1.3, 1.3);
[UIView commitAnimations];
}
}
When imageView collide with centre centre become bigger.
my problem is that when "imageView" collide with "centre" a second time the animation doesn't work. I want to make centre bigger and bigger and bigger every time imageView collide with center, but it become bigger just one time . Sorry for my english I'm french :/ How can I solve this please ?