Created
June 14, 2018 22:23
-
-
Save khanlou/dc9d26d2bd4445a63338c0941b6d68e3 to your computer and use it in GitHub Desktop.
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
import UIKit | |
class PassThroughView: UIView { | |
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