title: Cannot add UISearchController to UIViewController
body: <p>I am trying to add a <code>UISearchController</code> to a programatically created <code>UITableView</code>, in a <code>UIViewController</code> class. Here is my code:</p>
  
  <pre><code>var resultSearchController = UISearchController()
  
  var myTableView = UITableView()
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      myTableView.frame = CGRectMake(0, 0, view.bounds.width, view.bounds.height)
      myTableView.delegate = self
      myTableView.dataSource = self
  
      myTableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
  
      self.resultSearchController = ({
          let controller = UISearchController(searchResultsController: nil)
          controller.searchResultsUpdater = self //ERROR
          controller.searchBar.delegate = self //ERROR
          controller.dimsBackgroundDuringPresentation = false
          controller.searchBar.sizeToFit()
  
          self.myTableView.tableHeaderView = controller.searchBar
  
          return controller
      })()
  
      UIApplication.sharedApplication().keyWindow?.addSubview(myTableView)
  
  }
  </code></pre>
  
  <p>The two errors I get are</p>
  
  <pre><code> - Cannot assign a value of type 'ViewController' to a value of type 'UISearchBarDelegate?
   - Cannot assign a value of type 'ViewController' to a value of type 'UISearchResultsUpdating?
  </code></pre>
  
  <p>This code works when my class is subclassed with <code>UITableViewController</code>. So why doesn't it work with <code>UIViewController?</code></p>