IOS 8 top layout guide auto layout problems

autolayoutiosios8iphone

One of the screens in my app completely broke when updating to the iOS 8 SDK.
The problem seems to be that the top layout guide shifts up instead of being an 'anchor' for the rest of the views.

This is what the view looked like on iOS 7:

iOS 7 Screen

This is what it looks like in iOS 8 (captured from the Xcode 6 View Hierarchy debugger):

iOS 7 Screen

As you can see, the view appears way above the navigation bar.
There are two constraints on the top layout guide, one for the upper image view, and one for the white view below it.
There are no constraints on the bottom layout guide, only height constraints on the views.

For some reason, iOS 8 decides to push the top layout guide to {0 -255; 0 0} after [self.view layoutIfNeeded] is called for the first time.
Also, the view's bounds sometimes appear too large for the device (i.e. showing up exactly as in the unified storyboard (600×600), instead of 320×480/320×568.

What has changed in iOS 8 that might screw up the layout?

[EDIT]
Here is a complete list of the constraints on the view:

(lldb) po self.view.constraints
<__NSArrayM 0x786ac520>(
    <NSLayoutConstraint:0x7c377bd0 V:[_UILayoutGuide:0x7c372f60]-(0)-[UIView:0x7c373120]>,
    <NSLayoutConstraint:0x7c377c00 UIView:0x7c373120.width == UIView:0x7c3730b0.width>,
    <NSLayoutConstraint:0x7c377c30 UIView:0x7c3730b0.centerX == UIView:0x7c373120.centerX>,
    <NSLayoutConstraint:0x7c377c60 H:|-(0)-[UIView:0x7c3716f0]   (Names: '|':UIView:0x7c3730b0 )>,
    <NSLayoutConstraint:0x7c377c90 UIView:0x7c3716f0.width == UIView:0x7c3730b0.width>,
    <NSLayoutConstraint:0x7c372f30 V:[_UILayoutGuide:0x7c372f60]-(129)-[UIView:0x7c3716f0]>
)

Best Answer

Extend Edges > Under Top Bars is checked by default in the Extend Edges section of the Attribute Inspector.

Try unchecking Under Top Bars.

This has helped me many times when I got strange behaviour like this.

Please note it's a UIViewController property, so you can set it in code if you'd like.

Under Top Bars option in Interface Builder