title: When calling prepareForReuse() in CustomTableViewCell.swift, UITableViewCells become unresponsive after several deletions from UITableView (Swift 3)
body: <p>I have an app that pulls objects from Firebase, then displays them in a table. I've noticed that if I delete 5 entries (this is about when I get to the reused cells that were deleted), I can't delete any more (red delete button is unresponsive) &amp; can't even select the cells. This behavior stops when I comment out <code>override func prepareForReuse()</code> in the TableViewCell.swift controller. Why???</p>
  
  <p>The rest of the app functions normally while the cells are just unresponsive. Weirdly, if I hold one finger on a cell and tap the cell with another finger, I can select the cell. Then, if I hold a finger on the cell and tap the delete button, that cell starts acting normally again. What is happening here??? Here is my code for the table &amp; cells:</p>
  
  <p>In CustomTableViewCell.swift >></p>
  
  <pre><code>override func prepareForReuse() {
      // CELLS STILL FREEZE EVEN WHEN THE FOLLOWING LINE IS COMMENTED OUT?!?!
      cellImage.image = nil
  }
  </code></pre>
  
  <p>In ViewController.swift >></p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
  
      loadUserThings()
  }
  
  func loadUserThings() {
      ref.child("xxx").child(user!.uid).child("yyy").queryOrdered(byChild: "aaa").observe(.value, with: { (snapshot) in
          // A CHANGE WAS DETECTED. RELOAD DATA.
          self.arr = []
          for tempThing in snapshot.children {
              let thing = Thing(snapshot: tempThing as! DataSnapshot)
              self.arr.append(thing)
          }
          self.tableView.reloadData()
      }) { (error) in
          print(error)
      }
  }
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! CustomTableViewCell
      let cellData = arr[indexPath.row]
      ...
      // SET TEXT VALUES OF LABELS IN THE CELL
      ...
      // Setting image to nil in CustomTableViewCell
      let imgRef = storageRef.child(cellData.imgPath)
      let activityIndicator = MDCActivityIndicator()
      // Set up activity indicator
      cell.cellImage.sd_setImage(with: imgRef, placeholderImage: nil, completion: { (image, error, cacheType, ref) in
          activityIndicator.stopAnimating()
          delay(time: 0.2, function: {
              UIView.animate(withDuration: 0.3, animations: {
                  cell.cellImage.alpha = 1
              })
          })
      })
      if cell.cellImage.image == nil {
          cell.cellImage.alpha = 0
      }
      // Seems like sd_setImage doesn't always call completion block if the image is loaded quickly, so we need to stop the loader before a bunch of activity indicators build up
      delay(time: 0.2) {
          if cell.cellImage.image != nil {
              activityIndicator.stopAnimating()
              cell.cellImage.alpha = 1
          }
      }
      return cell
  }
  
  func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      // instantly deselect row to allow normal selection of other rows
      tableView.deselectRow(at: tableView.indexPathForSelectedRow!, animated: false)
      selectedObjectIndex = indexPath.row
      self.performSegue(withIdentifier: "customSegue", sender: self)
  }
  
  func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
      if editingStyle == .delete {
          print("should delete")
          let row = indexPath.row
          let objectToDelete = userObjects[row]
          userObjects.remove(at: row)
          ref.child("users/\(user!.uid)/objects/\(objectToDelete.nickname!)").removeValue()
          tableView.deleteRows(at: [indexPath], with: .fade)
      }
  }
  
  func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -&gt; UITableViewCellEditingStyle {
      if (self.tableView.isEditing) {
          return UITableViewCellEditingStyle.delete
      }
      return UITableViewCellEditingStyle.none
  }
  </code></pre>