title: how to reload a gif in swift UIWebView
body: <p>/* I am trying to reload a gif in <code>UIwebView</code> in swift but I have no idea how to reload the gif in a continuous loop . Load request doesn't work and not even <code>reload()</code> */</p>
  
  <p>Let </p>
  
  <pre><code>filePath = NSBundle.mainBundle().pathForResource("alienImage", ofType: "gif")
  
      let gif = NSData(contentsOfFile: filePath!)
  
      let webViewBG = UIWebView(frame: self.view.frame)
  
      webViewBG.loadData(gif!, MIMEType: "image/gif",textEncodingName: String(), baseURL: NSURL())
  
      webViewBG.userInteractionEnabled = false;
  
      self.view.addSubview(webViewBG)
  </code></pre>