我正在尝试在一个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”类型的值