I have a simple UIView used like container. If I write this code:
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *hitView = [super hitTest:point withEvent:event];
NSSet *sTouches = [event touchesForView:self];
NSLog(@"Touches %d", [sTouches count] );
return self;
}
Doesn t work! I would like get touches count in hitTest() message, before touchesBegan()! Is it possible?
我有这种等级:
UIView
+---> UIScrollView
When touch on my UIView
(single tap) the container moves. When I double touch (two finger) on my UIView
, the child UIScrollView
doesn t work for Zoom (for example).
So I have think to catch touches number.
If touch number is equal to one, hitTest
on my UIView
container return "self".
Else, if touch number is great to one ( == 2), hitTest
return "scrollview" pointer.
换言之,我要把两次inger光活动带入“禁试”信息/发明中。