By default the statusbar on an iPhone X looks like this:
But I would like to achieve this:
I tried setting the preferredStatusBarStyle>
Safe Area Layout is a solution to your problem.
I tried following the solution in my existing projects and it works fine.
Here is sample snapshot with result, By enabling or disabling Safe Area layout, I tested and implemented.
FYI: In these snapshots, main view has red background and child view has blue background color.
Safe Area Layout:
AutoLayout