我如何修复"方法不会覆盖其超类中的任何方法."?

Ebi*_*in 7 overriding uitableview ios

override func tableView(tableView:UITableView,cellForRowAtIndexPath indexPath:NSIndexPath) - > UITableViewCell {

    let cellIdentifier = "Cell"
    let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath) as! CustomTableViewCell

    // Configure the cell...
    cell.nameLabel.text = restaurantNames[indexPath.row]
    cell.thumbnailImageView.image = UIImage(named: restaurantImages[indexPath.row])
    cell.locationLabel.text = restaurantLocations[indexPath.row]
    cell.typeLabel.text = restaurantTypes[indexPath.row]

    cell.accessoryType = restaurantIsVisited[indexPath.row] ? .Checkmark : .None

    // Circular image
    cell.thumbnailImageView.layer.cornerRadius = cell.thumbnailImageView.frame.size.width / 2
    cell.thumbnailImageView.clipsToBounds = true

    return cell
}
Run Code Online (Sandbox Code Playgroud)

mkz*_*mkz 7

只需override从您的editActionsForRowAtIndexPathcommitEditingStyle函数声明中删除单词即可.