View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • AI & Machine Learning
    • App Intents
    • Apple Intelligence
    • Games
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Videos

Open Menu Close Menu
  • Collections
  • All Videos
  • About

More Videos

  • About
  • Summary
  • SwiftUI Group Lab

    Join us online for a deep dive into WWDC26 with Apple engineers and designers to ask questions, get advice, and follow the discussion about the week's biggest SwiftUI announcements. Conducted in English.

    Chapters

    • 0:00:00 - Introduction
    • 0:01:03 - Is there an architecture (MVC, MVVM, VIPER, Clean Architecture, etc.) the SwiftUI team expects us to adopt, or is SwiftUI intentionally architecture-agnostic?
    • 0:04:31 - What's the difference between a @ViewBuilder closure and a separate view struct, and what are the performance pros and cons of each?
    • 0:10:19 - What are the most common anti-patterns in SwiftUI you've seen lately?
    • 0:17:26 - What's one concept in SwiftUI that takes developers the longest to understand, and how would you explain it?
    • 0:24:00 - In UIKit, cell reuse was fundamental to scrolling performance. Are lazy stacks and grids enough for infinitely scrolling layouts in SwiftUI, or should you drop down to a hosted UICollectionView?
    • 0:26:55 - The change from @ViewBuilder to @ContentBuilder looks great — how does it work, and why did it improve type-checking performance?
    • 0:29:52 - When your teams hit a mystery re-render storm, what's the real workflow — the new SwiftUI Instrument, Self._printChanges, or something else? And why the underscore?
    • 0:34:18 - With the @ContentBuilder compilation improvements, is there any reason to keep using @ViewBuilder, and when should we choose each?
    • 0:35:26 - SwiftUI property wrappers feel like opaque magic. If I don't fully grasp how @State manages its lifecycle, how can I safely adopt Swift Concurrency — what's the mental model connecting them?
    • 0:38:32 - What's the recommended way to implement navigation in iOS 27 if custom transitions are required — SwiftUI or UIKit+SwiftUI?
    • 0:40:38 - What's the recommended way to track a ScrollView's scrolling offset, to show certain view elements based on how far the user has scrolled?
    • 0:43:41 - Is there a way to build custom layouts that are lazy, similar to LazyVStack?
    • 0:45:15 - What's the most common mistake in large SwiftUI apps that ends up hurting performance?
    • 0:48:39 - Do @Observable properties automatically get allocated on the correct thread, or should we explicitly mark UI-referenced properties @MainActor?
    • 0:53:28 - In our multi-module app we return AnyView from protocols to hide concrete view types and avoid cross-module dependencies. Is there a more idiomatic way without AnyView?
    • 0:56:13 - Can you explain the performance tradeoffs (speed and memory) of compositingGroup, geometryGroup, and drawingGroup?

    Resources

      • HD Video
      • SD Video
  • Search this video…
    • 0:00:00 - Introduction
    • Engineers from the SwiftUI team introduce themselves and set up a session covering SwiftUI architecture, view identity and updates, performance and view invalidation, the ContentBuilder change, navigation and scroll APIs, lazy layouts, and concurrency with @Observable and @State.

    • 0:01:03 - Is there an architecture (MVC, MVVM, VIPER, Clean Architecture, etc.) the SwiftUI team expects us to adopt, or is SwiftUI intentionally architecture-agnostic?
    • SwiftUI doesn't prescribe an architecture — it's designed to be architecture-agnostic, so use whatever pattern fits your app. @Observable helps here: it can model your data in AppKit/UIKit today and eases the transition to SwiftUI, and it's plain Swift not tied to any UI framework. If your chosen architecture integrates poorly or feels awkward passing data around, file feedback so the team can improve the ergonomics.

    • 0:04:31 - What's the difference between a @ViewBuilder closure and a separate view struct, and what are the performance pros and cons of each?
    • Both are valid; the choice is about clarity more than raw performance. Breaking a large body into smaller pieces makes views easier to reason about — a separate view struct gives SwiftUI a distinct identity and its own dependency tracking, so it can update independently, while a @ViewBuilder computed property is inlined into the parent and re-evaluates with it. Prefer separate view types when a subsection has its own state or should update on its own.

    • 0:10:19 - What are the most common anti-patterns in SwiftUI you've seen lately?
    • A frequently cited one is overusing GeometryReader — audit where you use it and prefer the Layout protocol (introduced a few years ago) where possible. More broadly, watch for patterns that cause excessive view invalidation. The framing the team prefers is less "anti-pattern" and more knowing the idiomatic right way to express layout and state.

    • 0:17:26 - What's one concept in SwiftUI that takes developers the longest to understand, and how would you explain it?
    • The hidden part is how SwiftUI updates via an internal graph — nodes represent views and edges represent their inputs (dependencies). SwiftUI uses that structure to determine which parts of your hierarchy need to update when data changes. Understanding that your view's inputs define its update behavior is the mental model that unlocks most performance and correctness questions.

    • 0:24:00 - In UIKit, cell reuse was fundamental to scrolling performance. Are lazy stacks and grids enough for infinitely scrolling layouts in SwiftUI, or should you drop down to a hosted UICollectionView?
    • UIKit relied on cell reuse mainly because views are reference types allocated on the heap, so every row carried a fixed allocation cost plus the overhead of inserting and removing it from the hierarchy. SwiftUI doesn't have that same problem, so you generally don't need to reach for a hosted UICollectionView. Lazy stacks and grids also bring real advantages: implicit prefetching starts evaluating the view bodies of cells about to scroll on screen, and because the view graph is made of individual nodes, SwiftUI can partially evaluate the next cell in the time left after rendering the current frame, then pause right before the next frame. One performance caveat: reconfiguring a cell's state in onAppear can change its size and force it to lay out again, throwing away that prefetched work — so do that setup in the initializer rather than in body or onAppear. As with onChange, prefer letting your data model drive changes, since both onChange and onAppear live in the view body and force it to recompute.

    • 0:26:55 - The change from @ViewBuilder to @ContentBuilder looks great — how does it work, and why did it improve type-checking performance?
    • See the What's New in SwiftUI talk for a visual walkthrough. The change reworks how the result builder is structured so the compiler type-checks builder content more efficiently, reducing the combinatorial type-checking cost that could make large view bodies slow to compile — without changing how you write your views.

    • 0:29:52 - When your teams hit a mystery re-render storm, what's the real workflow — the new SwiftUI Instrument, Self._printChanges, or something else? And why the underscore?
    • The recommended path is the SwiftUI Instrument, which visualizes updates and shows which views are re-evaluating and why. Self._printChanges remains a handy quick check for what caused a view to update; the underscore signals it's a debugging aid rather than stable API. Use the Instrument for systematic investigation of over-updating.

    • 0:34:18 - With the @ContentBuilder compilation improvements, is there any reason to keep using @ViewBuilder, and when should we choose each?
    • ContentBuilder and ViewBuilder are effectively the same — ContentBuilder is a type alias — so existing @ViewBuilder code keeps working unchanged. The one meaningful difference is reach: ContentBuilder can be used outside of views, so you can build your own SwiftUI-like DSLs and result-builder-based building blocks that aren't SwiftUI views. If you don't need that, there's nothing you have to change.

    • 0:35:26 - SwiftUI property wrappers feel like opaque magic. If I don't fully grasp how @State manages its lifecycle, how can I safely adopt Swift Concurrency — what's the mental model connecting them?
    • SwiftUI runs your view updates on the main actor, so @State and view body evaluation happen on the main thread by default — that's the anchor. Concurrency is about moving work off the main actor and bringing results back. You don't need to master @State's internal storage; the model is: UI state lives on the main actor, do async work elsewhere, and update that state back on the main actor.

    • 0:38:32 - What's the recommended way to implement navigation in iOS 27 if custom transitions are required — SwiftUI or UIKit+SwiftUI?
    • It depends on your app's needs, but iOS 27 adds a new SwiftUI API for customizing navigation transitions, with built-in support for cross-fades and other custom transitions. If those cover your case, stay in SwiftUI; only reach for UIKit interop when you need a transition the new API doesn't support.

    • 0:40:38 - What's the recommended way to track a ScrollView's scrolling offset, to show certain view elements based on how far the user has scrolled?
    • There are a few APIs depending on what you need: the onGeometryChange modifier, scroll effects (which offload work and are more efficient in some cases), and the scrollPosition modifier to know which item is currently on screen. Treat the raw content offset as an implementation detail — with lazy stacks it's only estimated from off-screen view heights and has no reliable semantic meaning — and instead trigger changes relative to the views actually on screen. There's also an API (covered in Rens' talk) for tracking what percentage of a view is visible, which is ideal for analytics or impression tracking. And a common way to build infinite scrolling is to put a view at the bottom of the list whose onAppear tells your networking layer to fetch more data.

    • 0:43:41 - Is there a way to build custom layouts that are lazy, similar to LazyVStack?
    • Not today — there's no protocol for describing a custom lazy layout; the Layout protocol is eager. If this matters for your use case, file a Feedback request with details, since developer demand helps prioritize adding it.

    • 0:45:15 - What's the most common mistake in large SwiftUI apps that ends up hurting performance?
    • Too much invalidation cascading from the top. A frequent cause is putting something high in the environment that many downstream views read — when it changes, everything observing it re-evaluates. Scope state so changes invalidate only the views that actually depend on them, rather than triggering wide downstream updates.

    • 0:48:39 - Do @Observable properties automatically get allocated on the correct thread, or should we explicitly mark UI-referenced properties @MainActor?
    • SwiftUI operates on the main actor, so state that views read is exercised on the main thread. Rather than annotating every property, let UI-facing state live on the main actor by default and only move computation off it deliberately. Decide where state lives based on who uses it: keep view-driving @Observable state main-actor-aligned, and isolate background work separately.

    • 0:53:28 - In our multi-module app we return AnyView from protocols to hide concrete view types and avoid cross-module dependencies. Is there a more idiomatic way without AnyView?
    • Prefer keeping type information over erasing it with AnyView. Use @ViewBuilder and an associated type (some View) on your protocol, or opaque return types, so the concrete view type stays hidden across module boundaries without paying AnyView's cost. Reserve AnyView for cases where you genuinely need heterogeneous, type-erased views.

    • 0:56:13 - Can you explain the performance tradeoffs (speed and memory) of compositingGroup, geometryGroup, and drawingGroup?
    • They serve different purposes. compositingGroup isn't primarily a performance tool — it flattens a subtree so visual effects apply to it as a whole. drawingGroup rasterizes content off-screen (via Metal), which can help with complex static visuals but costs memory and isn't free, so measure before using. geometryGroup isolates geometry changes so animations resolve correctly. Choose based on the effect you need, and profile rather than applying them speculatively.

Developer Footer

  • Videos
  • WWDC26
  • SwiftUI Group Lab
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • AI & Machine Learning
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    • Documentation Archive
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines