title: How to put UITableView inside a UIView
body: <p>I'm trying to implement a table view inside a UIView. One problem I'm currently struggling with is linking delegate and dataSource. If I uncomment two lines below Xcode gives an "expected declaration" error. If I link them from document outline Xcode says okay but then simulation crashes. It would be great if someone can figure out the problem.</p>
  
  <p>Thanks!</p>
  
  <pre><code>import UIKit
  class CurrentGameDetailView: UIView, UITableViewDelegate, UITableViewDataSource {
  
      @IBOutlet weak var tableView: UITableView!
      var theGame: GameObject? = nil
  
      func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return theGame!.roundNumber
      }
  
  //    tableView.delegate = self
  //    tableView.dataSource = self
  
      func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCellWithIdentifier("OldGameDetailCell", forIndexPath: indexPath) as! OldGameDetailCell
  
          cell.roundLabel.text = theGame!.gameRounds[indexPath.row].gamePlayed.description
          ...
  
          return cell
      }
  }
  </code></pre>