Mobile development

Stage 2 · Lesson 9 of 10

SF Symbols, semantic colours and dark mode

SwiftUI views and layout

SwiftUI supports for free if you use semantic colours, colours named for their job rather than their shade. Use .primary and .secondary for text and Color(.systemBackground) for backgrounds. For your brand colours, add colour sets in the with light and dark variants.

Set an accent colour once with .tint. are thousands of icons that match the system font, loaded with Image(systemName: "heart.fill"). They scale with , the user's text size setting, and support several rendering modes.

Check every screen in dark mode using the preview or the setting, and check contrast.

Common traphard-coded Color.white backgrounds and black text, which leave screens blinding or unreadable in dark mode.

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?