【发布时间】:2019-07-18 15:20:45
【问题描述】:
我不断收到此错误消息
无法将“UITableViewController”类型的值转换为 SecondViewController
我真的不知道请帮忙
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
var destination = segue.destination as! SecondViewController
destination.myString = outputName.text!
}
在“var”行上,但现在在覆盖“func line”上,我完全不知道这意味着什么。
【问题讨论】:
-
表示 UITableViewController 不是 SecondViewController。你想移动到 SecondViewController 但改为移动到 UITableViewController
-
@AndreyChernukha 什么?
-
我写的真的完全看不懂吗?
-
所以我在 UItableview 中创建类以匹配 secondviewcontroller
-
显示您的 SecondViewController 类的声明