重写UITableViewDelegate的tableView:cellForRowAtIndexPath:导致以下编译错误:
使用选择器'tableView:cellForRowAtIndexPath:'的覆盖方法具有不兼容的类型'(UITableView!,NSIndexPath!) - > UITableViewCell!'
覆盖函数的当前实现是:
override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell!
{
let cell = tableView.dequeueReusableCellWithIdentifier("cellIdent", forIndexPath: indexPath) as UITableViewCell
// Configure the cell...
return cell
}
Run Code Online (Sandbox Code Playgroud)
导致错误的原因是什么?