title: How do I have a different color for selected cells and why does it crash?
body: <p>I can change the color when a cell is selected, but when I click on another cell, I need the previous cell to go to the original color before it got selected. When I select a cell and scroll all the way down where that selected cell is not visible and click on another cell I get an error. Look below for error.</p>
  
  <pre><code> func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
      let cell: selectcell = table.cellForRowAtIndexPath(indexPath) as! selectcell
      cell.viewcheck.backgroundColor = UIColor.blackColor()
  }
  
  func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) {
      let cell: selectcell = table.cellForRowAtIndexPath(indexPath) as! selectcell // fatal error: unexpectedly found nil while unwrapping an Optional value
      cell.viewcheck.backgroundColor = UIColor.whiteColor()
  }
  </code></pre>