I have a container view that is nearly the full screen sans the status bar.
I then created a UISearchController and a UITableView. I am using ios 9 and doing things
You want to attach the top of the UITableView
to the bottom of the top layout guide.
That top layout guide is only available to you when using a Storyboard.
One more reason to use Interface Builder.
Reason number 1 = you wouldn't have this bug in the first place, you would be able to visualize your constraints, and you could achieve all this with exactly 0 lines of code.
I'm absolutely certain that with the right amount of effort, and support from the SO Community, you can do everything in code. I just find that IB saves not only design time, but offloads debugging to the OS, and ensures longer lifespan to any app. Storyboard allows you to concentrate on what makes your app different from my app, instead of agonizing over layout glitches.