Answer the question
In order to leave comments, you need to log in
How to catch a click in any area of UIWindow?
The essence of the problem: It is necessary to record a video from the screen of a mobile phone so that it can be seen where the user clicks.
Question: Is it possible to catch the touchDown / touchUp events anywhere, even on top of other controls, but so that these controls also receive this event.
Or maybe there are already other solutions to this problem?
Thank you.
Answer the question
In order to leave comments, you need to log in
Found this solution:
UIGestureRecognizer* tapper = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(handleSingleTap:)];
tapper.cancelsTouchesInView = NO;
[self.view addGestureRecognizer:tapper];
- (void)handleSingleTap:(UITapGestureRecognizer *) sender {
NSLog(@"handleSingleTap");
}
Have a look at ready-made components on cocoacontrols, it doesn't always make sense to reinvent your own wheel.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question