【发布时间】:2015-05-22 09:47:47
【问题描述】:
我正在使用 UITableView,但 text 属性存在一些问题。我已经正确地宣布了一切,我确信一切都是正确的。这是我的错误代码:
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{
let cell : UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "Test")
cell.text = taskAdder.tasks[indexPath.row].name
return cell
}
错误就行了:
cell.text = taskAdder.tasks[indexPath.row].name
上面写着:
'text' is unavailable: APIs depreciated as of iOS 7 and earlier are unavailable in Swift.
我不确定此错误的含义或如何修复它。
任何意见和建议将不胜感激。
提前致谢。
【问题讨论】:
标签: function uitableview swift text return