In iOS 7, we can now add a constraint between a view and the top layout guide, which I think is very useful to solve the status bar offset issue in iOS7(especially when ther
From iOS 9 you can also do it more simple with topLayoutGuide's anchors:
anchors
view.topAnchor.constraint(equalTo: self.topLayoutGuide.bottomAnchor).isActive = true
[controller.view.topAnchor constraintEqualToAnchor:controller.topLayoutGuide.bottomAnchor].active = YES;