title: MKMapView interaction is disabled when it's behind a UITabBarController (partial screen)
body: <p>Here is the hierarchy:</p>
  <p><a href="https://i.stack.imgur.com/mpATo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mpATo.png" alt="enter image description here" /></a></p>
  <p>The main view controller contains a <code>MKMapView</code>. Then I'll add a <code>UITabBarController</code> to this <code>UIViewController</code>. Here is the code:</p>
  <pre><code>class ViewController: UIViewController {
  
      var tab1VC: Tab1VC!
      var tab2VC: Tab2VC!
      var tabBarVC: MyTabBarController?
      
      override func viewDidLoad() {
          super.viewDidLoad()
          
          if let tabBarVC = storyboard?.instantiateViewController(withIdentifier: &quot;MyTabBarController&quot;) as? MyTabBarController {
              self.addChild(tabBarVC)
              self.view.addSubview(tabBarVC.view)
              tabBarVC.didMove(toParent: self)
              self.tabBarVC = tabBarVC
                          
              for vc in tabBarVC.viewControllers ?? [] {
                  if let vc = vc as? Tab1VC {
                      self.tab1VC = vc
                  } else if let vc = vc as? Tab2VC {
                      self.tab2VC = vc
                  }
              }
          }
  
      }
  </code></pre>
  <p>Then in different tab we'll change the size. For example, for tab1:</p>
  <pre><code>    override func viewDidLayoutSubviews() {
          super.viewDidLayoutSubviews()
          
          let h: CGFloat = 300        
          self.view.frame = CGRect(x: 0, y: UIScreen.main.bounds.height - h, width: UIScreen.main.bounds.width, height: h)
      }
  </code></pre>
  <p>For tab2:</p>
  <pre><code>    override func viewDidLayoutSubviews() {
          super.viewDidLayoutSubviews()
          
          let h: CGFloat = 400        
          self.view.frame = CGRect(x: 0, y: UIScreen.main.bounds.height - h, width: UIScreen.main.bounds.width, height: h)
      }
  </code></pre>
  <p>Then it shows like this:</p>
  <p><a href="https://i.stack.imgur.com/MacvA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MacvA.jpg" alt="enter image description here" /></a></p>
  <p>The problem is the map interaction is disabled so that I can't pinch, pan, zoom in/out at all. I think it could because the touch not pass through to the root <code>ViewController</code>. But the strange thing is the gesture event triggered if I addGesture to <code>ViewController</code>. Any idea?</p>