Preventing touches from happening behind a view?
<p>I'm programmatically presenting a view ontop of my main view controller's view. On the view I'm programmatically presenting there are buttons. The problem comes when I tap on one of these buttons, I'm interacting with the view I've presented my view overtop of. For example, I've got some buttons behind the view I'm presenting, and if I tap in the view where the covered up buttons are, the code still is getting run for the buttons behind the view even though they're hidden behind.</p>

<p>The only way I can think to stop this is to add tags to each of the views within my presented view and then do some logic like "while I'm presenting this view, go through all of the subviews on the main VC, and if those tags don't equal any of the tags in the presented view, turn off user interaction"</p>

<p>It seems super common to present a view overtop of other buttons/views. Is there a better way to accomplish this?</p>