title: UITableView Not displaying data AND not adding data
body: <p>I was watching this Youtube tutorial on how to dynamically add cells to a UITableView in Swift. </p>
  
  <p>I followed the video down to a tee but author neglected to show his UITableView Custom cell file, so I believe that that is where my issue is. </p>
  
  <p>Again my issue is my data in my array foods is not showing, and I am unable to add data to my array.</p>
  
  <p>Here is my viewController class - </p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UITextFieldDelegate {
  
  @IBOutlet weak var tableView: UITableView!
  
  @IBOutlet weak var addFoodtextField: UITextField!
  
  var foods: [String] = ["Bananas", "eggs", "grapes"]
  
  override func viewDidLoad() {
      super.viewDidLoad()
      tableView.tableFooterView = UIView(frame: CGRect.zero)
  }
  
  @IBAction func addButtonTapped(_ sender: Any) {
      insertNewFoodTitle()
  }
  
  func insertNewFoodTitle() {
      foods.append(addFoodtextField.text!)
  
      let indexPath = IndexPath(row: foods.count - 1, section: 0)
      tableView.beginUpdates()
      tableView.insertRows(at: [indexPath], with: .automatic)
      tableView.endUpdates()
  
      addFoodtextField.text = ""
      view.endEditing(true)
  }
  
  }
  
  extension ViewController: UITableViewDelegate, UITableViewDataSource {
  
      func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return foods.count
      }
  
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
          let foodTitle = foods[indexPath.row]
  
          let cell =  self.tableView.dequeueReusableCell(withIdentifier: "foodCell") as! foodCell!
          cell?.foodTitle?.text = foodTitle
  
          return cell!
      }
  }
  </code></pre>
  
  <p>And here is my foodCell class</p>
  
  <pre><code>import UIKit
  
  class foodCell: UITableViewCell {
  
  var foodTitle : UILabel?
  
  override func awakeFromNib() {
      super.awakeFromNib()
      // Initialization code
  }
  
  override func setSelected(_ selected: Bool, animated: Bool) {
      super.setSelected(selected, animated: animated)
  
      // Configure the view for the selected state
  }
  
  }
  </code></pre>
  
  <p>This is my app in the interface builder 
  <a href="https://i.stack.imgur.com/IdZfw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IdZfw.png" alt="enter image description here"></a></p>
  
  <p>and this is what I see when my app runs
  <a href="https://i.stack.imgur.com/bfXzY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bfXzY.png" alt="enter image description here"></a></p>