title: UITableViewCell selection in editing mode.
body: <p>I am making a custom UIViewController that I want to show a message when a UITableViewCell is tapped. I create a UITableView and set the property</p>
  
  <p><code>tableView.allowsSelectionDuringEditing = true</code></p>
  
  <p>Even though that property has been set to true, tableView(:didSelectRowAtIndexPath) is not being called to display the message. Why is this and how do I fix it?</p>
  
  <p>Here is my UITableViewController:</p>
  
  <pre><code>class GameListViewController: UIViewController, UITableViewDataSource, GameListViewDelegate, UITableViewDelegate
  {
  private var _games: [GameObject] = []
  
  var tableView: UITableView {return (view as GameListView).tableView}
  var gameListView: GameListView {return (view as GameListView) }
  
  override func loadView()
  {
      view =  GameListView(frame: UIScreen.mainScreen().bounds)
  
      gameListView.delegate = self
  }
  
  override func viewDidLoad()
  {
      super.viewDidLoad()
  
      tableView.dataSource = self
  }
  
  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int
  {
      return _games.count
  }
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell
  {
      var index: Int = indexPath.row         
      let currentGame = _games[index]
  
      var cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: nil)
      cell.textLabel?.lineBreakMode = NSLineBreakMode.ByCharWrapping
      cell.textLabel?.numberOfLines = 2
  
      if currentGame.isFinished == true
      {
          cell.imageView?.image = UIImage(named: "Finished.png")
          cell.textLabel?.text = "Winner: Player\(currentGame.playerMakingMove)\nMissiles Launched: \(currentGame.missileCount)"
      }
      else
      {
          cell.imageView?.image = UIImage(named: "Resume.png")
          cell.textLabel?.text = "Turn: Player\(currentGame.playerMakingMove)\nMissiles Launched: \(currentGame.missileCount)"
      }
      return cell
  }
  
  /*Handles deleting the cells*/
  func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath)
  {
      if (editingStyle == UITableViewCellEditingStyle.Delete)
      {
          var index: Int = indexPath.row
          _games.removeAtIndex(index)
          tableView.deleteRowsAtIndexPaths(NSArray(array: [indexPath]), withRowAnimation: UITableViewRowAnimation.Left)
      }
      tableView.reloadData()
  }
  
  /* Performs when a cell is touched */
  func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath)
  {
      var index: Int = indexPath.row
      tableView.selectRowAtIndexPath(indexPath, animated: true, scrollPosition: UITableViewScrollPosition.None)
  
      println("inside tableView: didSelectRowAtIndexPath")
      var message = UIAlertView(title: "Row selected", message: "You have selected a row", delegate: nil, cancelButtonTitle: "Click ME!", otherButtonTitles: "no other buttons")
  
      message.show()
  }
  
  func makeNewGame()
  {
      addGames(1)
      tableView.reloadData()
  }
  
  func addGames(gameNumber: Int)
  {
      var p1 = Player()
      var p2 = Player()
  
      for var i = 0; i &lt; gameNumber; i++
      {
          var randBool = Bool( round(drand48()))  // True/False
          var randPlayer:Int = Int( round( (drand48() + 1)) ) // 1 or 2
          var randMissleCount:Int = Int( arc4random_uniform(5000) + 1 )    //1 - 5001
  
          _games.append(GameObject(isFinished: randBool, playerMakingMove: randPlayer, missileCount: randMissleCount, player1: p1, player2: p2))
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Here is my UIView that contains the UITableView:</p>
  
  <pre><code>protocol GameListViewDelegate: class
  {
  func makeNewGame()
  }
  
  class GameListView: UIView, PictureButtonDelegate
  {
  var newGameButton: PictureButton!
  var tableView: UITableView!
  
  weak var delegate: GameListViewDelegate? = nil
  
  override init(frame: CGRect)
  {
      super.init(frame: frame)
  
      newGameButton = PictureButton(frame: CGRect(), fileName: "NewGame.png")
      newGameButton.backgroundColor = UIColor.grayColor()
      newGameButton.delegate = self
      newGameButton.setTranslatesAutoresizingMaskIntoConstraints(false)
  
  
      tableView = UITableView()
      tableView.allowsSelectionDuringEditing = true
      tableView.setTranslatesAutoresizingMaskIntoConstraints(false)
  
      self.addSubview(newGameButton)
      self.addSubview(tableView)
  }
  
  override func layoutSubviews()
  {
      let views: [String : UIView] = ["button": newGameButton, "tableView": tableView]
  
      addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-[button]-|", options: .allZeros, metrics: nil, views: views))
  
      addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-[tableView]-|", options: .allZeros, metrics: nil, views: views))
  
      addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-(&gt;=15,&lt;=25)-[button]-[tableView]-|", options: .allZeros, metrics: nil, views: views))
  }
  
  func buttonPushed()
  {
      delegate?.makeNewGame()
  }
  
  required init(coder aDecoder: NSCoder) {
      fatalError("init(coder:) has not been implemented")
  }
  }
  </code></pre>