1 //  Copyright (c) 2018, Applidium. All rights reserved
2 //  PassThroughView.swift
3 //  OverlayContainer
4 //
5 //  Created by Gaétan Zanella on 14/11/2018.
6 //
7 
8 import UIKit
9 
10 /// A view which removes itself from the responder chain.
11 ///
12 /// Use `PassThroughView` whenever you need to provide a backdrop view to an `OverlayContainerViewController`.
13 open class PassThroughView: UIView {
14 
15     // MARK: - UIView
16 
hitTestnull17     open override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
18         let view = super.hitTest(point, with: event)
19         if view == self {
20             return nil
21         }
22         return view
23     }
24 }
25