无法投射类型' UITableViewCell' (0x107ca3278)到' UITableView' (0x107c9c518)

时间:2016-10-16 10:25:41

标签: ios uitableview swift3

我也注册了单元格,但它没有以这种方式执行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]

        }

}

0 个答案:

没有答案