Originally answered here.
If you're using Safe Area Layout Guides you can do this completely in Interface Builder.
Pin the view you want under the status bar to the main view using the Top Space to Container Margin
constraint instead of Top Space to Safe Area
constraint.
Then on the Size Inspector for the main view, uncheck Safe Area Relative Margins.