This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
import UIKit | |
class TouchForwardingView: UIView { | |
var passthroughViews: [UIView] = [] | |
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { | |
guard let hitView = super.hitTest(point, with: event) else { return nil } | |
guard hitView == self else { return hitView } | |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer