I am working on a game where i'm allowing user to drag and drop image(UIImageView) on the target image(UIImageView), and i'm achieving this using (CGRectIntersectsRect) in TouchesEnded.
Now i need to do the same in (TouchesMoved), i already checked (CGRectIntersectsRect) for both images conditionally, if true i'm making both image frames equal and disabling user interaction to that image, it's indicating but image is still draggable till (TouchesEnded) called.
I'm using below listed code to end dragging in (TouchesMoved):
if([self distanceBetweenPoint:fruit1.center andPoint:fruit1b.center]<=45)
{
fruit1.frame = fruit1b.frame;
fruit1.userInteractionEnabled = FALSE;
}
Can anyone give me a solutions for this problem?