Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View under status bar in iPhone X simulator distorted

I have recently upgraded to xcode 9 and run my project on simulator iPhone X and the view under status bar is distorted. In other phone everything is working fine.

Distorted view in iPhone X

enter image description here

Undistorted view in other phones

enter image description here

like image 701
Sunil Sharma Avatar asked Sep 21 '17 21:09

Sunil Sharma


Video Answer


1 Answers

If you don't use Safe Area, you can pin it to the Top Layout Guide with 0 constant:

enter image description here

Or you can enable Safe Area in File inspector of a View Controller, it's backward deployable back to iOS 9, and again pin the top with 0 constant.

enter image description here

like image 118
jonaszmclaren Avatar answered Oct 04 '22 16:10

jonaszmclaren