title: Container view's collectionVC blocked with Parent's tapGesture recognizer
body: <p>I have an extension of UIViewController as follows to dismiss the keyboard if the user taps on the screen. Within this view I have a scroll containing textfields and two container views. The container views contain a collectionView. I want my overall viewController to dismiss when tapped around but I still want my collectionView's didSelectitemAtIndexPath to trigger. How can I achieve this?</p>
  
  <pre><code>public extension UIViewController {
      public func hideKeyboardWhenTappedAround() {
          let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(UIViewController.dismissKeyboard))
          view.addGestureRecognizer(tap)
      }
  
      public func dismissKeyboard() {
          view.endEditing(true)
      }
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>class RegisterVC: UIViewController {
  
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
          logViewLoad()
          self.hideKeyboardWhenTappedAround()
          let controller = self.storyboard?.instantiateViewController(withIdentifier: "CollectionViewSearchVC") as! CollectionViewSearchVC
          controller.type = "SC"
          addChildViewController(controller)
          controller.view.translatesAutoresizingMaskIntoConstraints = false
          controller.delegate = self
          containerView.addSubview(controller.view)
  
          NSLayoutConstraint.activate([
              controller.view.leadingAnchor.constraint(equalTo: containerView.leadingAnchor),
              controller.view.trailingAnchor.constraint(equalTo: containerView.trailingAnchor),
              controller.view.topAnchor.constraint(equalTo: containerView.topAnchor),
              controller.view.bottomAnchor.constraint(equalTo: containerView.bottomAnchor)
              ])
  
          controller.didMove(toParentViewController: self)
          subContractorVC = controller
  
          let employeeController = self.storyboard?.instantiateViewController(withIdentifier: "CollectionViewSearchVC") as! CollectionViewSearchVC
          employeeController.type = "V"
          employeeController.delegate = self
          addChildViewController(employeeController)
          employeeController.view.translatesAutoresizingMaskIntoConstraints = false
          employeeContainerView.addSubview(employeeController.view)
  
          NSLayoutConstraint.activate([
              employeeController.view.leadingAnchor.constraint(equalTo: employeeContainerView.leadingAnchor),
              employeeController.view.trailingAnchor.constraint(equalTo: employeeContainerView.trailingAnchor),
              employeeController.view.topAnchor.constraint(equalTo: employeeContainerView.topAnchor),
              employeeController.view.bottomAnchor.constraint(equalTo: employeeContainerView.bottomAnchor)
              ])
  
          employeeController.didMove(toParentViewController: self)
      }
  </code></pre>