I've been looking for a way to intercept all touch events of an app. I saw that I can add a gesture recognizer to the main window and get all the touches by using it's delegate method:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
NSLog(@"%@",touch);
return NO;
}
This way I don't harm all of the other touch events the app has. The problem is that I cannot get swipe events and such this way. Moreover, I cannot override UIWindow sendEvents because my app is an outside framework. I also do not want to add a transparent UIView on top.
Is there any other way to get swipes and other gesturs?