Frontmost UIView with TapGestureRecognizer not receiving touches
问题 I'm trying to add a (background) mask view to the front most window in my iOS app. On that mask view I want to add a UITapGestureRecognizer that will dismiss the mask view. Ultimately, I want to display a popup in the middle (i.e. my mask view is a faded background for the popup), but for now I'm just having trouble getting my background to dismiss as expected. The code looks like this: I get the front most window. I create the background view and add alpha. Then I add my gesture recognizer,