2011-01-10 6 views
0

나는 UIView 및 UIView에서 하위 뷰로 여러 이미지보기가 있습니다. 이 사례를 구현해야합니다. '이미지보기가 뷰에서 터치되면 다른 이미지 뷰 터치 이벤트가 전달되지 않습니다.'독점 터치 UIView 및 여러 이미지보기에서 하위보기로 UIView에서 작동하지 않습니다.

UIView에 독점적 인 touch 속성을 사용합니다.하지만 하위 뷰 중 하나를 터치하면 동시에 터치했습니다. 다른 하위 뷰의 touch 이벤트도 touch 이벤트를 전달합니다. 또한 모든보기에 대해 멀티 터치 사용 안 함을 설정했습니다.

답변

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]; 
     } 
} 
관련 문제