title: ios-Prevent reloading of cell in UITableView on scrolling
body: <p>I have implemented a <code>UIWebview</code> inside <code>UITableView</code>. When I scroll the table view the data reloads and there is some flickering of the <code>UIWebview</code>. This is because cells are reloaded whenever i scroll table view. I can save the state of cell or save the data of <code>UIWebview</code> in <code>NSMutableArray</code> for faster loading but i cannot save the cells. So how can i save the cell or prevent the reloading of cells again and again. I want those cells to be reloaded only once.</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
     let cell = tableView.dequeueReusableCellWithIdentifier("videoCell") as! UITableViewCell
  
      //  var height = UIScreen.mainScreen().applicationFrame.size.height
              let linksCell = links[indexPath.row].videoLink
          let winksCell = links[indexPath.row]
              mutArray.insertObject(linksCell!, atIndex: indexPath.row)
      println(mutArray)
  
  
      if let webView = cell.viewWithTag(21) as? UIWebView {
  
          webView.scrollView.scrollEnabled = false
          webView.scrollView.bounces = false
          var html = "&lt;html&gt;&lt;body&gt;&lt;iframe src=\"http://www.youtube.com/embed/\(mutArray[indexPath.row])\" width=\"\(videoTable.frame.width - 16)\" height=\"200\" frameborder=\"0\" allowfullscreen&gt;&lt;/iframe&gt;&lt;/body&gt;&lt;/html&gt;"
          webView.loadHTMLString(html, baseURL: nil)
  
          //  println(linksCell.videoLink)
        //  println(html)
      }
  
      if let videoName = cell.viewWithTag(22) as? UILabel {
          videoName.text = winksCell.title
          videoName.adjustsFontSizeToFitWidth = true
      }
  
      return cell
  
  }
  </code></pre>