0

I have a UIView and several image Views as subview views on UIView. I need to implement this case, "When a image view is touched on the view then other image view touch event will not delivered".

I use the exclusive touch property to the UIView, but when I touch one of the subviews, I touched at the same time, the touch event of the other subviews also deliver the touch event. I also set multi touch disable for all the views.

4

1 回答 1

0
for (UITouch *touch in touches)
{
    currentTouch=touch;

    if (CGRectContainsPoint([self.view frame], [touch locationInView:self.image1view]))
    {
        Give desired action here….
        [self transformSpinnerwithTouches:touch];
    }
    else
        if (GRectContainsPoint([self.view frame], [touch locationInView:self.imageview2]))
        {
            Give desired action here as well….
            [self dispatchTouchEvent:[touch view]WithTouch:touch];
        }
}
于 2011-01-11T09:44:00.263 回答