Apple's options for Auto Layout in code aren't the best. Check out some of the fantastic third party APIs available.
I'm the developer of UIView+AutoLayout, which is designed to provide the API that Apple should have in the first place (it's inspired heavily by the IB options): https://github.com/smileyborg/UIView-AutoLayout