views:

14

answers:

1

I know this is somewhat a noob question but anyways im having hard time figuring it out. Im trying to cancel out the touchmove event on an UIImage when it colide with other UIImage.

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint currentPosition = [touch locationInView:self];

if (blueIsDragging == YES){
    blue.center = currentPosition
    if (CGRectIntersectsRect(blue.frame,red.frame)) {
        //got stuck here
    }           
}

}

Thank you.

A: 

Possible duplicate of How to cancel a touch sequence.

raaz