title: How to animate a webview when tapping and changing URL on it in Nativescript?
body: <p>Hello Nativescript community. Here's my problem :</p>
  
  <p><strong>What I need to do</strong></p>
  
  <p>I'm trying to animate a webview (opacity) to make it disappear ONLY when webview url change (not with a backtotop for example).</p>
  
  <p><strong>Playground</strong></p>
  
  <p><a href="https://play.nativescript.org/?template=play-js&amp;id=7yxxiH" rel="nofollow noreferrer">https://play.nativescript.org/?template=play-js&amp;id=7yxxiH</a></p>
  
  <p><strong>Issues</strong></p>
  
  <p>It works fine on Android, <strong>but NOT on iOS</strong>, the webview disappear, appear and disappear again multiple times, to stay finally with the opacity to 0.</p>
  
  <p><strong>Code used</strong></p>
  
  <pre><code>function onWebviewTape(args) {
  
    var page = args.object.page;
    var webview = page.getViewById("myWebView");
  
    webview.on(webViewModule.WebView.loadStartedEvent, (args) =&gt; {
      webview.animate({
        opacity: 0,
        duration: 100,
        delay: 0
      });
      console.log('webview disappear');
    });
  
    webview.on(webViewModule.WebView.loadFinishedEvent, (args) =&gt; {
      webview.animate({
        opacity: 1,
        duration: 100
      });
      console.log('webview appear');
    });
  
  
  }
  exports.onWebviewTape = onWebviewTape;
  
  </code></pre>
  
  <p><strong>Console log</strong></p>
  
  <pre><code>[iPhone de hugo]: webview disappear
  [iPhone de hugo]: webview appear
  [iPhone de hugo]: webview disappear
  [iPhone de hugo]: webview disappear
  [iPhone de hugo]: webview disappear
  [iPhone de hugo]: webview disappear
  [iPhone de hugo]: webview disappear
  [Galaxy S8]: webview disappear
  [Galaxy S8]: webview appear
  </code></pre>