title: ios swift uitableview add last cell
body: <p>I want to add a cell into my tableview to the last row using another UserInterface.The code is like this.</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      var cell:JoinCell = tableView.dequeueReusableCellWithIdentifier(reuseIdentifier, forIndexPath: indexPath) as! JoinCell
  
      let lastSectionIndex = tableView.numberOfSections-1
      let lastSectionLastRow = tableView.numberOfRowsInSection(lastSectionIndex) - 1
      let lastIndexPath = NSIndexPath(forRow:lastSectionLastRow, inSection: lastSectionIndex)
  
      let cellIndexPath = tableView.indexPathForCell(cell)
  
      if cellIndexPath == lastIndexPath {
          cell = tableView.dequeueReusableCellWithIdentifier("JoinFooterCell") as! JoinFooterCell
      }
  </code></pre>
  
  <p>I got error message "Cannot assign value of type 'JoinFooterCell' to type 'JoinCell'"</p>
  
  <p>Does anyone can give me advise? Thanks.</p>