Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIStoryBoard - Prevent View from overlapping status bar (iOS 11 App)

I want to stop overlapping of my View with statusbar

enter image description here

like image 542
Irfan Anwar Avatar asked Jan 30 '23 14:01

Irfan Anwar


1 Answers

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.

enter image description here

As an example I have used gray image view:

enter image description here

As you can see below, it does not overlap status bar:

enter image description here

like image 197
jonaszmclaren Avatar answered Feb 05 '23 15:02

jonaszmclaren