How to prevent app from overlapping status bar in ios-11, iPhone-X, Xcode-9
I want to stop overlapping of my View with statusbar Use Auto Layout and pin your view to Top Layout Guide, or use the new Safe Area Layout Guides. To enable it, in your storyboard's File inspector tick the following option. As an example I have used gray image view: As you can see below, it does not overlap status bar: 来源: https://stackoverflow.com/questions/46275652/how-to-prevent-app-from-overlapping-status-bar-in-ios-11-iphone-x-xcode-9