Created
February 15, 2018 11:56
-
-
Save arturlector/9241f8f567ba7d1bbbb4e4aa2ad02b73 to your computer and use it in GitHub Desktop.
Ignore the view itself, but still deliver touches to its subviews
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { | |
let result = super.hitTest(point, with: event) | |
if result == self { return nil } | |
return result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment