Apple expands SwiftUI with Generative Layouts API for adaptive UIs
Design · 5 min read
At WWDC 2026 Apple announced a major addition to SwiftUI: the Generative Layouts API. Leveraging on-device machine learning, the API proposes and synthesizes complete adaptive layouts that designers can accept or refine. It integrates with existing constraints and accessibility settings to ensure templates remain compliant with VoiceOver, Dynamic Type, and Contrast preferences.
The API emphasizes privacy by performing inference locally on Apple silicon, with no layout metadata sent to cloud services. Developers can provide high-level goals, brand tokens, and content types, then receive suggested layouts ranked by usability and accessibility metrics. SwiftUI inspectors will show how each proposed layout scores against Apple's Human Interface Guidelines.
Design teams are expected to adopt the API for prototyping and rapid iteration: it exports variants directly to Xcode Previews and can produce code that developers can edit. Apple also shipped new documentation and sample components showing how to lock down spacing systems and design tokens to prevent generative changes from violating brand rules.