即使更改新的swift3.0语法(如删除NS前缀和其他语法),也会发生错误。错误说Swift 3与tableView的错误
不能调用非功能型UITableView
我很高兴的价值,如果我能有解决这个问题的提示。
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: IndexPath) -> UITableViewCell {
let cell = super.tableView(tableView, cellForRowAtIndexPath: indexPath)
return cell
}
实际上我没有任何自定义单元格。 – ucb
好吧,只需用你的标签访问它,最后让cell = tableView.dequeueReusableCell(withIdentifier:“cartcel”,for:indexPath)as!的UITableViewCell –
FUNC的tableView(的tableView:UITableView的,的cellForRowAtIndexPath indexPath:NSIndexPath) - >的UITableViewCell { 让细胞= tableView.dequeueReusableCellWithIdentifier( “Songcell”,forIndexPath:indexPath) 让事件名称:的UILabel =(cell.viewWithTag(7)! UILabel) eventname.text = songnamearray.objectAtIndex(indexPath.row)as?字符串 恢复单元 } 这里是答案迅速2.0和7.3的Xcode对不起 –