title: How to add a subView on a WKWebView that can be panning along this webView?
body: <p>I want to add a subView to this WKWebView with this content (<a href="https://www.windytv.com/?-34.816,138.608,5" rel="nofollow noreferrer">https://www.windytv.com/?-34.816,138.608,5</a>). so that the subView can be panning along with the webview (imagine there's landmark view being panning along), but I could do it.</p>
  
  <p>I tried many ways as follows:</p>
  
  <ol>
  <li>I add a landmarkView to different subViews of the webView, failed.  </li>
  </ol>
  
  <p>1.1 For example: </p>
  
  <pre><code>[self.webView addSubView:landmarkView];
  </code></pre>
  
  <p>1.2 Or: </p>
  
  <pre><code>[self.webView.scroolView addSubView:landmarkView];
  </code></pre>
  
  <p>1.3 Or:</p>
  
  <pre><code>[self.webView.scroolView.subViews.firstObject addSubView:landmarkView]; // In viewDidAppear
  </code></pre>
  
  <p>The interesting thing here is the view hierachy of WKWebsite will change in viewDidAppear. It gets more subView like "WKContentView".</p>
  
  <ol start="2">
  <li>Followed by 1., I try to add a gestureView to pass the gesture to move the landmarkView, failed. The action of the gesture did not procceed. </li>
  </ol>
  
  <p>1.1. For example, I add on the super view of webView. </p>
  
  <pre><code>[self.view addSubView: baseView];
  [self.baseView addSubView: webView];
  self.panGestureRecognizer.cancelsTouchesInView = NO;
  [webView addGestureRecognizer: self.panGestureRecognizer];
  </code></pre>
  
  <ol start="3">
  <li><p>Or, I add on the subView of webView.  </p>
  
  <p>[self.view addSubView: webView];
  [self.webView addSubView: gestureView];
  gestureView.backgroundColor = [UIColor clearColor];
  self.panGestureRecognizer.cancelsTouchesInView = NO;
  [gestureView addGestureRecognizer: self.panGestureRecognizer];</p></li>
  </ol>
  
  <p>Anyone familiar with WKWebView? </p>
  
  <p>Except for UIGesture, Is there other ways to distribute a touch to many views?
  If I could override the touchesBegan method in one of the subViews, it should be much easier. And I think hitTest still work only on a view.</p>
  
  <p>The general </p>
  
  <pre><code>- (void)viewDidLoad
  {
      UIView *landmarkView = [[UIView alloc] initWithFrame:CGRectMake(200, 200, 200, 200)];
      landmarkView.backgroundColor = [UIColor redColor];
  
      NSString *path = @"https://www.windytv.com/?-37.331,145.102,7";
      NSURL *url = [NSURL URLWithString:path];
      NSURLRequest *request = [NSURLRequest requestWithURL:url];
      [self.webView loadRequest:request];
      [self.view addSubView: self.webView];
  
      [self.webView.scrool addSubView:landmarkView]; // This is one of the failed attempts.
  }
  </code></pre>