Reputation: 2040
I know that you can use a UITapDetector to detect any time the screen is tapped. But, is there a way to detect any time the screen is simply touched? Long, short, whatever, the finger doesn't even have to come up again, just any time the screen is touched at all, have something happen.
Upvotes: 0
Views: 79
Reputation: 534885
Yes, implement UIResponder touchesBegan(_:with:)
and related methods. Now you are receiving the raw touches (not completely raw, since they are still associated with the hit-test view); and you can interpret or respond to them however you like. That's how you'd implement a drawing app, for example.
That in fact is what we used to have to do for all touches, before gesture recognizers were invented.
Upvotes: 1