根据我的其他线程,我的代码中有一个信号SIGABRT错误。代码包括:Swift:表视图 - 信号SIGABRT
包含1个TableView和1个表格单元格的故事板 自定义Tablecell类(TableViewCell_Prototyp),它通过(强)IBoutlets连接到故事板。 View Controller类,在下文中进行描述。
我的ViewController类连接到3个超类:UIViewController,UITableViewDelegate,UITableViewDataSource。另外,还有3个功能被执行。有人可以找到错误吗?
override func viewDidLoad() {
super.viewDidLoad()
}
我不知道这里会发生什么。它是默认写入的,所以它不应该导致任何错误。
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
我只想要一个表单元格被返回。
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell (withIdentifier: "picCell") as! TableViewCell_Prototyp
cell.shoutPic.image = #imageLiteral(resourceName: "Bildschirmfoto 2017-06-05 um 10.11.21")
cell.shoutText.text = "Hallooooooooo"
return cell
}
shoutPic和shoutText通过插座连接到TableViewCell_Prototype自定义类。
什么是完整的错误消息?哪一行代码正在导致错误? – rmaddy
libC++ abi.dylib:以NSException类型的未捕获异常终止 –