Swift detect touch anywhere on the screen
<p>I know you can detect touches using touchesBegan, touchesEnded, etc.
These all work. The only thing is that they only detect the touches on the view itself, not on anything on top of that view like a text field.</p>

<p>My goal is to create a timeout after a certain period of inactivity. The timeout will be reset if the screen is touched, meaning someone is still using the app. It works so far, as long as they don't tap on any controls (like a label, button, textview, etc).</p>

<p>I could also reset the timeout when any controls are tapped, but that would require a lot more cases (different types of controls on different view controllers).</p>

<p>I'm looking for and end-all screen tap detection method. Any ideas?</p>