title: Delegate method not invoked
body: <p>Guys I have a problem with invoking a delegate method in a view controller. I followed several tutorials but I'm not able to get it working. Can you point what I am doing wrong? Thanks</p>
  
  <p>View:</p>
  
  <pre><code>protocol TableViewCellDelegate: class {
      func showNutrients(cell: TableViewCell)
  }
  
  class TableViewCell: UITableViewCell {
  
      @IBOutlet weak var nutrientsButton: UIButton!
      @IBOutlet weak var editButton: UIButton!
      @IBOutlet weak var removeButton: UIButton!
      @IBOutlet weak var mealLabel: UILabel!
  
      weak var delegate: TableViewCellDelegate?
  
      @IBAction func showNutrients(_ sender: Any) {
          delegate?.showNutrients(cell: self)
      }
  
  }
  </code></pre>
  
  <p>View Controller:</p>
  
  <pre><code>class NutritionViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, TableViewCellDelegate {
  
      @IBOutlet weak var tableView: UITableView!
      var cell = TableViewCell()
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          tableView.delegate = self
          tableView.dataSource = self
          cell.delegate = self
      }
  
      ...
  
      func showNutrients(cell: TableViewCell) {
          let indexPath = self.tableView.indexPath(for: cell)
          self.meals[indexPath!.row].nutrientsShown.negate()
          self.tableView.reloadRows(at: [indexPath!], with: .none)
      }
  }
  </code></pre>