title: Prevent reuse of custom cells in table view Swift
body: <p>I have a problem which i'm not sure how to solve.</p>
  
  <p>I have two custom cell nibs - data for both is fetched from separate arrays.</p>
  
  <p>The structure is the following</p>
  
  <pre><code>nib1-cell line1
  nib1-cell line2
  ...
  nib1-cell line n
  nib2-cell line1
  </code></pre>
  
  <p>there is always one nib2-cell at the end with the <code>uibutton</code>.<br>
  Once the <code>uibutton</code> is pressed - the nib1 array is appended.<br>
  I figured out a way how to insert values at the bottom of the <code>tableview</code>, but when i scroll downwards or upwards the cell with nib2 is reused and replaced with nib1-cell data.
  <a href="https://i.stack.imgur.com/wAGf4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wAGf4.png" alt="enter image description here"></a></p>
  
  <p>How can i either prevent those cells from being reused or save their state ?</p>
  
  <p>Thank you.</p>
  
  <p>UPDATE: datasource and cellForRowAtIndexPath code</p>
  
  <p>func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {</p>
  
  <pre><code>    return someTagsArray.count
  
  }
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell     {
  
      if(indexPath.row &lt; someTagsArray.count - 1){
          var cell:TblCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as! TblCell
  
          cell.lblCarName.text = someTagsArray[indexPath.row]
  
  
          return cell
  
      } else if (indexPath.row == someTagsArray.count - 1){
        var celle:vwAnswers = self.tableView.dequeueReusableCellWithIdentifier("cell2") as! vwAnswers
          celle.Answer1.setTitle(answersdict[answersdict.endIndex - 2], forState:UIControlState.Normal)
  
          answertitle1 = "\(celle.Answer1.currentTitle!)"
  
          celle.Answer2.setTitle(answersdict.last, forState:UIControlState.Normal)
          answertitle2 = "\(celle.Answer2.currentTitle!)"
  
          //println(answertitle2)
  
          return celle
  
      } else {
                      var cell2:TblCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as! TblCell
          return cell2
      }
  
  }
  </code></pre>