how to check UIView and UIImageView is touched or not in iphone sdk?

ios, iphone, objective-c, uigesturerecognizer, uitouch

Solution

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{   
    if (CGRectIntersectsRect(imageview.frame, view.frame)) {
        view.backgroundColor=[UIColor redcolor];
    }
}

Problem

I have One `UIView` and one Draggable `UIImageView`. Background color of `UIView` is green. When I will drag the image, `UIImageView` will touch `UIView`. When I drag the image over `UIView` the colour of `UIView` should become red. How to check that `UIImageView` reached over `UIView` ?

Original source