9
votes

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
}
2
I am getting conflict error if i remove override from editActionsForRowAtIndexPath functionsEbin
You most likely have a typo in your method signature.Roselle Tanner

2 Answers

8
votes

Just remove override word from your editActionsForRowAtIndexPath and commitEditingStyle function declarations.

2
votes

You should share your full class. Although, it seems that you are NOT OVERRIDING any method from your base class. Simple remove the override keyword from your method, or identify the correct BaseClass in which an Overridable method with the same signature(that you want to override) exists and then properly use the extends keyword.

I think you should first google the terms: MethodOverriding, BaseClass(or SuperClass)