title: tableview custom cell: use of undeclared type
body: <p>I'm setting up custom cell for a tableview and got it almost work properly except some annoying errors. So I setup a prototype cell in storyboard with identifier: RankingCell and class: RankingCell.</p>
  
  <p>I setup a very basic class file : RankingCell.swift</p>
  
  <pre><code>import Foundation
  import UIKit
  
  
   class RankingCell: UITableViewCell {
      @IBOutlet var firstName: UILabel!
      @IBOutlet var lastName: UILabel!
  }
  </code></pre>
  
  <p>The outlets are correctly linked to field inside the custom cell.
  Now here is the view controller file:</p>
  
  <pre><code>class RankingViewController: UIViewController, UITableViewDelegate {
  
      var testArray = ["Ben", "rob"]
      var testArray2 = ["mel", "duval"]
  
  
      func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return 2
      }
  
       func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -&gt; UITableViewCell! {
  
          let cell = tableView.dequeueReusableCellWithIdentifier("RankingCell") as RankingCell //Error I here
  
          cell.firstName.text = testArray[indexPath.row]
          cell.lastName.text = testArray2[indexPath.row]
  
          return cell
      }
  
      override func viewDidLoad() {
      super.viewDidLoad()
      tableView.reloadData() //Error II here
  
  
      }
  
  }
  </code></pre>
  
  <p>The error I outlined by the complier is "use of undeclared type 'RankingCell'". What's weird is that when I compile, it compiles with no problem, and even displays correct data in the cells. Still I would prefer to do things properly and get ride of the outlined error.</p>
  
  <p>The second error is in viewdidload. I simplified the code in the example, but I pull data from a backend, and once I have it, I need to reload the table so I put there tableView.reloadData() which trigger error: "(UITableView, numberOfRowsInSection: Int) -> Int' does not have a member named 'reloadData'". Thus I can't have the table reload with appropriate data. Maybe you know how to have data reloaded properly from viewdidload ?</p>
  
  <p>Please answer in swift.</p>