Overriding UITableViewDelegate tableView:cellForRowAtIndexPath:causes the following compilation error:
The overriding method with the selector 'tableView: cellForRowAtIndexPath:' has an incompatible type '(UITableView !, NSIndexPath!) -> UITableViewCell!'
The current implementation of the override function is:
override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell!
{
let cell = tableView.dequeueReusableCellWithIdentifier("cellIdent", forIndexPath: indexPath) as UITableViewCell
return cell
}
What causes the error and how can it be fixed?
source
share