0

My app stretches through the whole screen of the device. How can I set it to stretch only to the notch area? Ideally, in all screen orientations.

I'm using Objective-C, and Storyboard for the layout.

Thanks for any help. Cannot find the proper documentation, if someone can point me to the correct direction, that would be great.

Eir
  • 1,003
  • 9
  • 24

1 Answers1

1

The area that you refer to below the notch is called 'safe area'. You can change the top of the view to confine it into the safe area. Refer: https://stackoverflow.com/a/47076040/19425375

  • Thanks a lot. I'm using Storyboard for the layout, what you pointed out was a way to set things programatically. Still haven't got it to work properly. – Eir Aug 13 '22 at 15:17
  • Enable "Use safe area" on all view elements, and don't forget to "Add missing constraints". Once that is done, enjoy your life while adjusting the visual elements on your storyboard. – Eir Aug 16 '22 at 12:06