title: How to use the heightForRowAtIndexPath method?
body: <p>I am trying to use the <code>heightForRowAtIndexPath</code> method in my <code>UITableViewController</code>. But when I try to override the method it says that it does not override any methods from its superclass.</p>
  
  <p>Googling has led me to protocols, which seem to potentially be some part of the puzzle, but I'm still trying to understand how to use a protocol to use this method. </p>
  
  <p>Any help would be greatly appreciated. Here's the code: (the problem method is at the very bottom)</p>
  
  <pre><code>import UIKit
  import Firebase
  
  class FruitsTableViewController: UITableViewController {
      let rootRef = FIRDatabase.database().reference()
  
      override func numberOfSections(in tableView: UITableView) -&gt; Int {
          return 1
      }
  
      override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return 15
      }
  
      override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: "LabelCell", for: indexPath)
  
          let busRef = rootRef.child("buses")
          busRef.observeSingleEvent(of: .value, with: {(snapshot) in
              if let snapshots = snapshot.children.allObjects as? [FIRDataSnapshot] {
                  let bus = snapshots[Int(indexPath.row)].key
                  let busval = snapshots[Int(indexPath.row)].value as! String
                  cell.textLabel?.text = "Bus \(bus) ------- \(busval)"
              }
          })
  
          return cell
      }
  
      override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -&gt; String? {
          return "Section \(section)"
      }
  
      override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -&gt; CGFloat {
          return 40.0
      }
  }
  </code></pre>