我也注册了单元格,但它没有以这种方式执行segue 这是我得到错误的地方:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
if segue.identifier == "showDetail" {
let sender = sender as! UITableView . //error
let destController = segue.destination as! HekDetailTableViewController
let indexPath = sender.indexPathForSelectedRow!
destController.iD = idArray[indexPath.row]
}
}