Mobile development

Stage 2 · Lesson 5 of 10

Safe areas, screen sizes and Dynamic Type

SwiftUI views and layout

keeps content inside the by default, clear of the Dynamic Island, the and the keyboard. Backgrounds can stretch behind them with .ignoresSafeArea(). .safeAreaInset(edge: .bottom) pins a button above the home indicator while list content scrolls behind it.

Use built-in text styles like .body and .headline, so text follows the user's setting (their chosen text size). Check that screens still work at the largest sizes, usually by letting them scroll. Test every screen on the smallest iPhone your app supports, the largest one and in landscape.

Common trapfixed font sizes and heights, which clip or overlap text for users with larger text.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

  • CourseFree
    SwiftUI Tutorials (Apple)

    Apple · Beginner

    Apple's own path from views and stacks to lists and navigation

  • CourseFree
    100 Days of SwiftUI

    Paul Hudson (Hacking with Swift) · Beginner

    Days 16 to 35 build six small apps on views, modifiers, lists and animation

Practise

  • Use a free challenge's mobile design image as the spec for a native screen

Keep handy

Mark this stage as not done?