title: Gif in UIWebView
body: <pre><code>var filePath = NSBundle.mainBundle().pathForResource("long1", ofType: "gif")
  var gif = NSData(contentsOfFile: filePath!)     
  var webViewBG = UIWebView(frame: view.frame)
  webViewBG.loadData(gif, MIMEType: "image/gif", textEncodingName: nil, baseURL: nil)
  webViewBG.userInteractionEnabled = false
  self.view.insertSubview(webViewBG, atIndex: 0)
  </code></pre>
  
  <p>This is my code for adding a webview with a Gif loaded in it. However, while the web view may fill the view.frame, the .gif isn't filling the web view. Because of this, there are grey borders around the gif. </p>
  
  <p>I've tried sizetoscale and various other tricks but they all didn't work!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>UIImage+animatedGIF works great</p>