I want to select a row of UITableView with override of the follow function:
class table:  NSObject, UITableViewDelegate, UITableViewDataSource{
    func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: IndexPath) {
            print("NEVER")  
        }
    }
}
but never show the print, why? what is the wrong in my 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)
    }
}
for more information :
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        var cell  = UITableViewCell()
        tableView.register(newCell.self, forCellReuseIdentifier:"newCell");
        cell =  tableView.dequeueReusableCell(withIdentifier: "newCell", for: indexPath) as! newCell
        cell.accessoryType = .disclosureIndicator;
        return  cell
    }
}
 
     
    