title: ios 8 swift - how to add footer for tableview using separate datasource
body: <p>For 2 days I'm trying to solve this.
  I just want to add a footer (custom cell) to my tableview.
  I have a view with some stuff on it (labels, buttons) and I've added a tableview.
  To have a clean controller, for the datasource I'm using a separate file:</p>
  
  <pre><code>class MyDataSource: NSObject, UITableViewDataSource, UITableViewDelegate {
   ...   
  }
  </code></pre>
  
  <p>In my controller I have :</p>
  
  <pre><code>class MyViewController: UIViewController {
  
      @IBOutlet weak var myButton: UIButton!
      var myDatasource: MyDataSource!
      @IBOutlet weak var myTableView: UITableView!
      override func viewDidLoad() {
          super.viewDidLoad()
          myDatasource = MyDataSource(....)
          myTableView.dataSource = myDatasource
          // Do any additional setup after loading the view.
      }
  </code></pre>
  
  <p>So, in <code>MyDataSource</code> I've added:</p>
  
  <pre><code> func tableView(tableView: UITableView, viewForFooterInSection section: Int) -&gt; UIView? {
          let footerView = UIView(frame: CGRectMake(0, 0, tableView.frame.size.width, 40))
          footerView.backgroundColor = UIColor.blackColor()
          return footerView
      }
  
       func tableView(tableView: UITableView, heightForFooterInSection section: Int) -&gt; CGFloat {
          return 40.0
      }
  </code></pre>
  
  <p>And this piece of code is not being called.
  I've looked the documentation and I've found that these 2 last methods are part of <code>UITableViewController</code> and not of part of <code>UITableViewDataSource</code>.</p>
  
  <p>So, my question is, how to achieve that ?</p>
  
  <p>Thanks.</p>
  
  <p>C.C.</p>