Scale an image every time it collide with another

Posted by jean mayot on Stack Overflow See other posts from Stack Overflow or by jean mayot
Published on 2011-06-29T14:27:13Z Indexed on 2011/06/29 16:22 UTC
Read the original article Hit count: 275

Filed under:
|
|
|
|

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 ?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about xcode