一个带两个tableviewcontroller的tableview?

时间:2016-04-19 13:30:26

标签: ios swift uitableview

我正在尝试在一个tableview中链接两个或更多tableviewcontroller(根据需要)。

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    let selected = table[indexPath.row].type
    switch selected {
    case "Pickles":
        let VC = storyboard!.instantiateViewControllerWithIdentifier("cell2") as! SecondTableController
        self.navigationController?.pushViewController(VC, animated: true)
        VC.Pickler()
    case "Dough" :
        let VC = storyboard!.instantiateViewControllerWithIdentifier("cell2") as! thirdTableViewController
        self.navigationController?.pushViewController(VC, animated: true)
        VC.Pickler()
    default:
        break
    }

它显示:

  

无法转换“UITableViewController”类型的值

0 个答案:

没有答案
相关问题