title: UITableView Cell Selecting Errors: Cell Changes Text, Can't Deselect Row?
body: <p>I'm trying to create a simple <strong>matching game</strong> in swift using a UITableView where you have to match the boat type with the definition of that boat type. Basically, everything is messed up with the game right now. The style of the cells are set to <strong>plain</strong>. Here is the code for the methods that may be causing problems:</p>
  
  <pre><code>var currentSelectedText = "None"
  override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
      let cell = self.tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
      switch cell.textLabel.text! as String {
      case "Used to carry the pharoah":
          currentSelectedText = "Used to carry the pharoah"
      case "Used to carry bodies as a ceremony":
          currentSelectedText = "Used to carry bodies as a ceremony"
      case "Had a flat deck to carry a farmer's treasure":
          currentSelectedText = "Had a flat deck to carry a farmer's treasure"
      case "Daily, it made a trip around the world to carry Ra":
          currentSelectedText = "Daily, it made a trip around the world to carry Ra"
      case "Towed by smaller boats, carrying heavy objects":
          currentSelectedText = "Towed by smaller boats, carrying heavy objects"
      case "Used for business and pleasure by officials/nobles":
          currentSelectedText = "Used for business and pleasure by officials/nobles"
      case "Carried most Egyptians and some goods":
          currentSelectedText = "Carried most Egyptians and some goods"
      default:
          currentSelectedText = "None"
      }
      switch indexPath.row {
      case 7:
          switch cell.textLabel.text! as String {
          case "Ferry":
              if currentSelectedText == "Carried most Egyptians and some goods" {
                  cell.textLabel.text = "Correct"
                  cell.textLabel.textColor = UIColor.greenColor()
              } else if currentSelectedText == "None" {
              } else {
                  performSegueWithIdentifier("Game End", sender: self)
              }
          case "Funeral Barge":
              if currentSelectedText == "Used to carry bodies as a ceremony" {
                  cell.textLabel.text = "Correct"
                  cell.textLabel.textColor = UIColor.greenColor()
              } else if currentSelectedText == "None" {
              } else {
                  performSegueWithIdentifier("Game End", sender: self)
              }
          case "Cargo Boat":
              if currentSelectedText == "Towed by smaller boats, carrying heavy objects" {
                  cell.textLabel.text = "Correct"
                  cell.textLabel.textColor = UIColor.greenColor()
              } else if currentSelectedText == "None" {
              } else {
                  performSegueWithIdentifier("Game End", sender: self)
              }
  </code></pre>
  
  <p>I have many more cases for the row, all the way up to row 13 (<code>case 8, case 9, case 10 . . .</code>). I also have more boat types (I have 7 boat types). I also have a method for when a row is deselected:</p>
  
  <pre><code>override func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) {
      currentSelectedText = "None"
  }
  </code></pre>
  
  <p>Remember, the cell style is set to <strong>plain</strong>. The problems are:</p>
  
  <ol>
  <li>The text of the cell changes to "Title" when I select it. </li>
  <li>I can't deselect the rows</li>
  <li>If there's anything else that is not right for a matching game with a UITableView, I would appreciate if you listed what I could do to solve that.</li>
  </ol>
  
  <p>If there is any more code I need to provide, let me know. Thank you!</p>