Adapting to User Accessibility Settings in SwiftUI

In this course, learn how to adapt a SwiftUI app to common Accessibility settings including Dark Mode and Dynamic Type. Work with Accessibility Inspector and SwiftUI Previews to learn how to build for Accessibility faster. By Harlan Kellaway.

Leave a rating/review
Download materials
Save for later
Comments
Share

Who is this for?

If you’re looking to enhance the accessibility of your SwiftUI app by responding to user settings, this course is a good match for you. SwiftUI knowledge and previous experience with Accessibility development will be helpful, but not essential.

Covered concepts

  • Accessibility Inspector
  • SwiftUI Previews
  • SwiftUI Environment
  • Dark Mode
  • Dynamic Type

Part 1: Adapting to User Accessibility Settings in SwiftUI

Learn how to locate Accessibility Settings on both device and the simulator. Experience previewing Dark Mode implementation on the simulator and how this differs from the quick feedback SwiftUI Previews provide.

Accessibility Inspector is a long-established tool that enables developers to inspect their Accessibility implementations on the simulator. Explore some powerful features unique to Accessibility Inspector and learn what’s now available at-hand with SwiftUI Previews. Leave SwiftUI’s Live Preview to discover Debug Preview and how its Environment Overrides tool applies to Accessibility.

Toggle description

Dark Mode is a common setting that enables users to view your app with a dark color palette. Learn how to use UIKit standard color objects to help your app adapt automatically to Dark Mode. Work through updating a SwiftUI view to support Dark Mode and how to test it using Debug Preview.

Many Accessibility setting values are available in the SwiftUI Environment. Learn how to adapt dynamically to Accessibility setting changes within in a SwiftUI view by handling Smart Invert.

Toggle description

Dynamic Type (a.k.a. Larger Text) is a common Accessibility setting that enables users to set the font size they feel comfortable reading. Work through updating a SwiftUI view to adapt dynamically to larger font sizes and learn how to test it using Debug Preview.