As below screenshot showed, I have a black dimmer View on the top and a viewController on the bottom(the white one) with half screen size.
What I want to do is when I tap on the dimmer place aka. outside of the viewController. This viewController should be dismissed.
YES, I found tons of topic using touchesBegan
. But in my case it is not working, the problem is touchesBegan
cannot detect touches outside current presented viewController. It would never be triggered when I click on that dimmer view.
And if I use Gesture check on the dimmer view, I could not dismiss this viewController from dimmer view too.
Any advice is welcomed if anyone met this similar situation with me.