title: How to prevent UITableView from reuse custom cells Swift
body: <p>In my App I use <strong>UITableView</strong> with <strong>custom</strong> cells. </p>
  
  <p>for each cell I implement function to create it, and call these functions in cellForRow. </p>
  
  <p>this is an code example from project : </p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
  
      if indexPath.row == CellsTypes.profileImageCell.rawValue {
  
          return createIntroCell()
      }
  
      else if indexPath.row == CellsTypes.fullNameCell.rawValue {
  
          return createUserNameCell()
  
      }
  
      else if indexPath.row == CellsTypes.emailCell.rawValue {
  
          return createEmailCell()
  
  
      }
      else  {
  
          return createPasswordCell()
  
      }}
  </code></pre>
  
  <p>and these are the creation functions : </p>
  
  <pre><code>func createUserNameCell() -&gt; TextFieldTableViewCell {
  
      let fullNameCell = self.tableView.dequeueReusableCellWithIdentifier("text-field-cell") as! TextFieldTableViewCell
      fullNameCell.awamirTextFieldNib.setNormalTextFieldCellContent("Full Name")
      fullNameCell.awamirTextFieldNib.textFieldContent.tag = CellsTypes.fullNameCell.rawValue
      fullNameCell.awamirTextFieldNib.textFieldContent.returnKeyType = .Next
      fullNameCell.awamirTextFieldNib.textFieldContent.delegate = self
      return fullNameCell
  }
  
  func createEmailCell() -&gt; TextFieldTableViewCell {
  
      let emailCell = self.tableView.dequeueReusableCellWithIdentifier("text-field-cell") as! TextFieldTableViewCell
      emailCell.awamirTextFieldNib.setNormalTextFieldCellContent("Email")
      emailCell.awamirTextFieldNib.textFieldContent.tag = CellsTypes.emailCell.rawValue
      emailCell.awamirTextFieldNib.textFieldContent.returnKeyType = .Next
      emailCell.awamirTextFieldNib.textFieldContent.delegate = self
      return emailCell
  }
   func createPasswordCell() -&gt; TextFieldTableViewCell {
  
      let textFieldCell = self.tableView.dequeueReusableCellWithIdentifier("text-field-cell") as! TextFieldTableViewCell
      textFieldCell.awamirTextFieldNib.setPasswordCellContent("Password")
      textFieldCell.awamirTextFieldNib.textFieldContent.tag = CellsTypes.passwordCell.rawValue
      textFieldCell.awamirTextFieldNib.textFieldContent.returnKeyType = .Next
      textFieldCell.awamirTextFieldNib.textFieldContent.delegate = self
  
      return textFieldCell
  }
  </code></pre>
  
  <p>the problem is if I reload the tableview the content of cells changed because of the reusablity of the cells. i.e: after reload the tableview the content of the first cell become in the second cell, and the content of the sencond on became in the first cell!!</p>
  
  <p>how can I prevent tableview from reusable the cells?!</p>
  
  <p>Thanks.</p>