title: How select a row in UITableView?
body: <p>I want to select a row of UITableView with override of the follow function: </p>
  
  <pre><code>class table:  NSObject, UITableViewDelegate, UITableViewDataSource{
      func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: IndexPath) {
              print("NEVER")  
          }
      }
  }
  </code></pre>
  
  <p>but never show the print, why? what is the wrong in my code?</p>
  
  <pre><code>class OtherClass: UIViewController {
      var table = Table()
  
      override func viewWillAppear(_ animated: Bool) {
          super.viewWillAppear(animated)
  
          let mtv = UITableView()
          mtv.dataSource = table
          mtv.delegate = table
  
          view.addSubview(mtv)
      }
  }
  </code></pre>
  
  <p>for more information :</p>
  
  <pre><code>public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          var cell  = UITableViewCell()
  
          tableView.register(newCell.self, forCellReuseIdentifier:"newCell");
          cell =  tableView.dequeueReusableCell(withIdentifier: "newCell", for: indexPath) as! newCell
          cell.accessoryType = .disclosureIndicator;
  
          return  cell
      }
  }
  </code></pre>