I am subclassing MainWindow with UIWindow and in that using hit test method:
-(UIView *)hitTestCGPoint)point withEventUIEvent *)event {
UIView *hitView = [super hitTestoint withEvent:event];
if (hitView == self)
return [[self subviews] lastObject];
else if([hitView isDescendantOfView:myView])
{
NSSet *touches = [event allTouches];
for (UITouch *touch in touches) {
if ([touches count] >= 2) { // prevent this NSLog(@"Count =2"); return [[self subviews] lastObject]; } } } return hitView; }
But I am getting touches as zero object. I debugged and checked event is always having 0 object. But responder is having details of the events . why is like that and how should I get the tap count ?