From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Layout and iPhone X

Layout and iPhone X

- [Instructor] With the introduction of the iPhone X, you get that full screen, but that notch gets in the way. To get around that and some common other problems, there is the safe area. Let me show you how to use the safe area and how to avoid it when necessary. Load the demo app. I've set this app up to be one you might have built before Xcode Nine. Set your simulator to iPhone X, and run this. When you run this, you'll see that there are some things at the top but we can't tell where they are because they're hidden under the navigation bar. I can rotate with the command right arrow, and you can see some of it pop up. You've got some buttons here. And we've got something else hidden under the navigation bar. I can also see that some of my buttons could get obscured by the notch. Go ahead and stop the app. Head over to the main storyboard. The safe area is meant to prevent this behavior. As you rotate an iPhone X, that notch in the navigation bar will move. The safe area takes this…

Contents