You can use the function CGRectIntersectsRectto easily check the intersection of rectangles if UIImageViews have the same supervisor (more precisely, have the same coordinate space).
You will probably need to add the code as follows:
-(void) touchesEnded:(NSSet *) touches {
if(CGRectIntersectsRect([imageViewA frame], [imageViewB frame])) {
NSLog(@"Do something.");
}
}
UIView, , , , .