{"id":52332,"date":"2026-06-19T15:43:37","date_gmt":"2026-06-19T19:43:37","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=52332"},"modified":"2026-06-19T15:44:53","modified_gmt":"2026-06-19T19:44:53","slug":"swiftui-in-appleos-27","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2026\/06\/19\/swiftui-in-appleos-27\/","title":{"rendered":"SwiftUI in appleOS 27"},"content":{"rendered":"<p><a href=\"https:\/\/developer.apple.com\/documentation\/macos-release-notes\/macos-27-release-notes\">macOS Golden Gate 27 Beta Release Notes<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/documentation\/macos-release-notes\/macos-27-release-notes\">\n<p><code>AsyncImage<\/code> now automatically caches downloaded images using HTTP caching protocols, allowing servers to control caching behavior via standard headers.<\/p>\n<p>[&#8230;]<\/p>\n<p>Xcode 27 introduces a new <code>@State<\/code> implementation that avoids this repeated evaluation. This new behavior back-deploys to iOS 17 aligned OSes. The new <code>@State<\/code> is implemented with a Swift macro. It is largely source compatible with the property wrapper version, with a few exceptions.<\/p>\n<p>[&#8230;]<\/p>\n<p><code>Text<\/code> views now support <code>TextRenderer<\/code>.<\/p>\n<p>[&#8230;]<\/p>\n<p>In apps built with the 27.0 SDKs, the new <code>ReadableDocument<\/code> and <code>WritableDocument<\/code> protocols support asynchronous reading and writing, progress reporting, and direct access to document URLs. New <code>DocumentGroup<\/code> initializers that adopt these protocols let you disable document creation for editing-only apps and present custom UI before any document is opened.<\/p>\n<p>[&#8230;]<\/p>\n<p><code>TextField<\/code> respects custom font and color styling applied to its prompt.<\/p>\n<p>[&#8230;]<\/p>\n<p><code>List<\/code> accepts drops in two cases that previously didn&rsquo;t work: drags with compatible transfer representations are accepted into reorderable content even when the <code>.reorderableItem<\/code> transfer type isn&rsquo;t present, and a <code>.dropDestination(&#8230;)<\/code> modifier declared on a list item now performs the drop.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/documentation\/updates\/swiftui\">SwiftUI updates<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/documentation\/updates\/swiftui\">\n<p>Build your project in Xcode 27 or later to construct type-agnostic content from closures that you mark with <a href=\"https:\/\/developer.apple.com\/documentation\/SwiftUI\/ContentBuilder\"><code>ContentBuilder<\/code><\/a>, which serves as the unified replacement for type-specific builders like <a href=\"https:\/\/developer.apple.com\/documentation\/SwiftUI\/ToolbarContentBuilder\"><code>ToolbarContentBuilder<\/code><\/a> and <a href=\"https:\/\/developer.apple.com\/documentation\/SwiftUI\/CommandsBuilder\"><code>CommandsBuilder<\/code><\/a>.<\/p>\n<p>Add reordering by drag-and-drop in containers such as lists, stacks, grids, or custom layouts with <a href=\"https:\/\/developer.apple.com\/documentation\/SwiftUI\/DynamicViewContent\/reorderable()\"><code>reorderable()<\/code><\/a> and <a href=\"https:\/\/developer.apple.com\/documentation\/SwiftUI\/View\/reorderContainer(for:isEnabled:move:)\"><code>reorderContainer(for:isEnabled:move:)<\/code><\/a>.<\/p>\n<p>Add custom swipe actions to views in containers such as scroll views, stacks, grids, or custom layouts using <a href=\"https:\/\/developer.apple.com\/documentation\/SwiftUI\/View\/swipeActions(edge:allowsFullSwipe:content:onPresentationChanged:)\"><code>swipeActions(edge:allowsFullSwipe:content:onPresentationChanged:)<\/code><\/a> and <a href=\"https:\/\/developer.apple.com\/documentation\/SwiftUI\/View\/swipeActionsContainer()\"><code>swipeActionsContainer()<\/code><\/a>.<\/p>\n<p>[&#8230;]<\/p>\n<p>Use the <a href=\"https:\/\/developer.apple.com\/documentation\/SwiftUI\/ToolbarContent\/visibilityPriority(_:)\"><code>visibilityPriority(_:)<\/code><\/a> modifier to prioritize important toolbar actions so SwiftUI keeps them visible as space shrinks, moving lower-priority items to the overflow menu first.<\/p>\n<p>[&#8230;]<\/p>\n<p>Present an alert or confirmation dialog from an optional data item or error object, and use that data to produce the content and title[&#8230;]<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/269\/\">What&rsquo;s new in SwiftUI<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/269\/\">\n<p>Explore the latest additions to SwiftUI and discover how they can improve your apps. We&rsquo;ll introduce a new Document protocol with direct disk access and snapshot-based diffing for building high-performance apps; new APIs for reordering content in lists, grids, and sections; and toolbar enhancements including visibility priority and auto-minimizing behavior. We&rsquo;ll also cover expanded presentation APIs &mdash; including swipe actions on any view &mdash; plus AsyncImage caching improvements and lazy state initialization for Observable types.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/272\/\">Use SwiftUI with AppKit and UIKit<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/272\/\">\n<p>Discover how to incrementally adopt SwiftUI in your existing AppKit or UIKit app. We&rsquo;ll show you how to use the Observation framework to automatically update your views, integrate SwiftUI components into an existing view hierarchy, and bring gesture recognizers into SwiftUI. We&rsquo;ll also explore how to add complete SwiftUI scenes to your app without changing your overall architecture.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/321\/\">Dive into lazy stacks and scrolling with SwiftUI<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/321\/\">\n<p>Discover the inner workings of lazy stacks in SwiftUI. We&rsquo;ll explore how LazyVStack and LazyHStack estimate sizes, lazily load subviews, and prefetch content to deliver smooth scrolling experiences. We&rsquo;ll also cover advanced performance optimizations, state management best practices, and tips for precise programmatic scrolling. To get the most out of this session, we recommend basic familiarity with SwiftUI layout using stacks.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/322\/\">Compose advanced graphics effects with SwiftUI<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/322\/\">\n<p>Discover how to craft rich, custom experiences by creatively composing SwiftUI layout and graphics APIs. We&rsquo;ll show you how to break down complex designs and use a creative pipeline to chain simple building blocks together. Learn how to draw with layer shaders, animate with timelines, and anchor views with alignment guides.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/271\/\">Build powerful drag and drop in SwiftUI<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/271\/\">\n<p>Follow along as we build a game of Solitaire to explore the latest drag-and-drop capabilities in SwiftUI. We&rsquo;ll show you how to use the new reordering API to let people arrange content, implement drag containers to move multiple items at once, and customize the drag-and-drop lifecycle to fit your app&rsquo;s rules.<\/p>\n<\/blockquote>\n\n<p>There are also a <a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/8002\/\">bunch<\/a> <a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/8006\/\">of<\/a> <a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/8120\/\">labs<\/a>.<\/p>\n\n<p><a href=\"https:\/\/nilcoalescing.com\/blog\/InitializingObservableClassesWithTheStateMacroInXcode27\/\">Natalia Panferova<\/a>:<\/p>\n<blockquote cite=\"https:\/\/nilcoalescing.com\/blog\/InitializingObservableClassesWithTheStateMacroInXcode27\/\">\n<p>Up until now it was a property wrapper conforming to the <code>DynamicProperty<\/code> protocol, but in Xcode 27 it becomes a Swift macro. In this post we will look at what the change means for <code>@Observable<\/code> models stored in <code>@State<\/code>.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/x.com\/malhal\/status\/2064065083865473284\">Malcolm Hall<\/a>:<\/p>\n<blockquote cite=\"https:\/\/x.com\/malhal\/status\/2064065083865473284\">\n<p>Only took 3 years lol!<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/swiftwithmajid.com\/2026\/06\/08\/what-is-new-in-swiftui-after-wwdc26\/\">Majid Jabrayilov<\/a>:<\/p>\n<blockquote cite=\"https:\/\/swiftwithmajid.com\/2026\/06\/08\/what-is-new-in-swiftui-after-wwdc26\/\">\n<p>SwiftUI also introduces a new <em>prominent<\/em> tab role. You can use the <em>prominent<\/em> role for trailing-separated tabs, similar to search.<\/p>\n<p>[&#8230;]<\/p>\n<p>Document-based apps get a refreshed look and feel, along with a performance boost. It looks like Xcode has started using these improvements, which might explain why we see so much work around document-based apps this year. And finally, Xcode introduces SwiftUI Specialist and What&rsquo;s New in SwiftUI skills for agentic coding in Xcode.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/weekly.fatbobman.com\/p\/fatbobmans-swift-weekly-139\">Fatbobman<\/a>:<\/p>\n<blockquote cite=\"https:\/\/weekly.fatbobman.com\/p\/fatbobmans-swift-weekly-139\">\n<p>For me, the biggest change in SwiftUI comes from its comprehensive support for document-based apps. It not only adds a large number of new APIs, but also shifts the mental model toward &ldquo;observable document objects + asynchronous snapshots + dedicated readers \/ writers.&rdquo; This is clearly better suited to complex document apps, and it also aligns more closely with the overall evolution of modern Swift around Observation and Concurrency.<\/p>\n<p>The sessions also mentioned that SwiftUI continues to optimize layout- and container-related implementations, bringing noticeable performance improvements in some scenarios. This is an improvement developers have urgently needed. However, SwiftUI still does not provide the ability to create custom Lazy containers, which remains a clear disappointment.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/nilcoalescing.com\/blog\/NewSwiftUIAPIsForReorderingAndDragAndDropOniOS27\/\">Natalia Panferova<\/a>:<\/p>\n<blockquote cite=\"https:\/\/nilcoalescing.com\/blog\/NewSwiftUIAPIsForReorderingAndDragAndDropOniOS27\/\">\n<p>iOS 27 introduces new reordering APIs that work with any container. We can mark dynamic content with <code>reorderable()<\/code> and define the scope of the interaction with <code>reorderContainer(for:)<\/code>. SwiftUI handles the drag preview, insertion placeholder, and drop animation, while our code applies the resulting change to the model.<\/p>\n<p>SwiftUI&rsquo;s drag container APIs are also now available on iPhone and iPad, after previously being limited to macOS. They let us make items in a collection draggable without making the collection reorderable, and include multiple selected items in the same drag. The APIs also support lazy generation of transferable values and drag-session observation.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@dlx\/116720264873580258\">robb<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@dlx\/116720264873580258\">\n<p>I love the new #SwiftUI Text selection but without a way to make selection span multiple Texts in a group, it doesn&rsquo;t really address our needs at Linear &#x2013; here&rsquo;s hoping we see an update in a later seed &#x1F91E;<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/nilcoalescing.com\/blog\/SwiftUINavigationTransitionUpdatesIniOS27\/\">Natalia Panferova<\/a>:<\/p>\n<blockquote cite=\"https:\/\/nilcoalescing.com\/blog\/SwiftUINavigationTransitionUpdatesIniOS27\/\">\n<p>The <a href=\"https:\/\/developer.apple.com\/documentation\/swiftui\/navigationtransition\">NavigationTransition<\/a> protocol has been available in SwiftUI since iOS 18, letting us control how views animate when pushed onto a <code>NavigationStack<\/code> and when presenting sheets and full-screen covers. We specify the transition using the <code>navigationTransition(_:)<\/code> modifier on the destination or presented view, and SwiftUI uses it instead of the default animation for that context. Before iOS 27, SwiftUI provided two built-in conforming types: <code>AutomaticNavigationTransition<\/code>, used via the <code>automatic<\/code> static value, which defers to the system default for the current context, and <code>ZoomNavigationTransition<\/code>, used via <code>zoom(sourceID:in:)<\/code>, which animates the presented view expanding from a source view marked with <code>matchedTransitionSource()<\/code>. iOS 27 introduces <a href=\"https:\/\/developer.apple.com\/documentation\/swiftui\/crossfadenavigationtransition\">CrossFadeNavigationTransition<\/a>, a new built-in transition that cross-fades between views without requiring a source, and adds <a href=\"https:\/\/developer.apple.com\/documentation\/swiftui\/anynavigationtransition\">AnyNavigationTransition<\/a>, a type eraser that lets us select a transition at runtime.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@iKyle\/116716408286718322\">Kyle Howells<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@iKyle\/116716408286718322\">\n<p>The last few years watching WWDC has been a mixed experience for me, because I honestly believe Swift and SwiftUI are actively either bad or being made worst.<\/p>\n<p>Yet every year, the problems I have with them are doubled down on, not improved.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/kyleye.top\/posts\/swiftui-sensoryfeedback-intensity-payload\/\">Kyle-Ye<\/a>:<\/p>\n<blockquote cite=\"https:\/\/kyleye.top\/posts\/swiftui-sensoryfeedback-intensity-payload\/\">\n<p>The FB21333309 cache bug I submitted is now confirmed to be fixed on iOS 27.<\/p>\n<p>Instead of introducing a new CacheKey like I suggested, SwiftUI team choose to move the intensity payload out of the FeedbackType enum to a new Payload enum and add a new payload var to SensoryFeedback storage.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/chaos.social\/@dasdom\/116735828022212662\">dasdom<\/a>:<\/p>\n<blockquote cite=\"https:\/\/chaos.social\/@dasdom\/116735828022212662\">\n<p>A few weeks ago I realised that most iOS jobs require knowledge of SwiftUI. So I started to rebuild my Mastodon client in SwiftUI. Then I got an offer for a new job and accepted it. \nThis means I can get back to working on the ObjC version. Feels good. :)<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/18\/uikit-in-ios-27\/\">UIKit in iOS 27<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/18\/appkit-in-macos-27\/\">AppKit in macOS 27<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/17\/wwdc-2026-links\/\">WWDC 2026 Links<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/12\/rewriting-notion-in-swiftui\/\">Rewriting Notion in SwiftUI<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/09\/xcode-27-announced\/\">Xcode 27 Announced<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/04\/xogot-for-mac-beta\/\">Xogot for Mac Beta<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/04\/wwdc-2026-preview\/\">WWDC 2026 Preview<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/04\/where-did-swiftui-leave-you-hanging\/\">Where Did SwiftUI Leave You Hanging?<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/03\/wwdc-2026-wish-lists\/\">WWDC 2026 Wish Lists<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2025\/06\/18\/swiftui-at-wwdc-2025\/\">SwiftUI at WWDC 2025<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>macOS Golden Gate 27 Beta Release Notes: AsyncImage now automatically caches downloaded images using HTTP caching protocols, allowing servers to control caching behavior via standard headers. [&#8230;] Xcode 27 introduces a new @State implementation that avoids this repeated evaluation. This new behavior back-deploys to iOS 17 aligned OSes. The new @State is implemented with a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2026-06-19T19:43:44Z","apple_news_api_id":"ad7028a8-6c25-4f93-bdc6-2be8e8484e4e","apple_news_api_modified_at":"2026-06-19T19:44:59Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/ArXAoqGwlT5O9xivo6EhOTg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[31,2887,30,2784,71,2200,901,1812],"class_list":["post-52332","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-ios","tag-ios-27","tag-mac","tag-macos-27","tag-programming","tag-swift-concurrency","tag-swift-programming-language","tag-swiftui"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/52332","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=52332"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/52332\/revisions"}],"predecessor-version":[{"id":52334,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/52332\/revisions\/52334"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=52332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=52332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=52332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}