title: UISearchController doesn't want to appear because he is not in view hierarchy
body: <p>I am trying to make search in my UITableViewController using UISearchController. For starter project i use <a href="https://developer.apple.com/library/ios/samplecode/TableSearch_UISearchController/Introduction/Intro.html#//apple_ref/doc/uid/TP40014683-Intro-DontLinkElementID_2">Apple's example</a>.
  I made some changes and I want to use one class instead of thee as in example. I am adding my UISearchController from code. My problem is I cannot call UISearchController because of exeption : </p>
  
  <pre><code>2015-06-18 13:35:04.750 TableSearch[4796:77813] Warning: Attempt to present &lt;UISearchController: 0x7fe09b719f00&gt; on &lt;APLMainTableViewController: 0x7fe09b50e450&gt; whose view is not in the window hierarchy!
  </code></pre>
  
  <p><a href="https://github.com/Yurssoft/IOSVC/tree/master/TableSearch">Working project with changes</a></p>
  
  <p>Can someone please tell me what I did wrong?
  Thanks!</p>