Post

Yesterday, Apple updated the #SwiftUI documentation, and I found some cool and useful new additions! Here’s everything new 👇

We can also read these values with GeometryReader. For example, on iPhone 18, the horizontal content margins are 16 points. On Duo in landscape, they’re 20 points on the leading edge and 0 on the trailing edge, where space is reserved on the right.

At WWDC, I told someone at Apple I’d love to have access to more of the defaults they use behind the scenes, including padding and margins. This feels like a step in the right direction, especially now that Duo is here and things are more complicated than before.

Next up: iOS 27.2 adds toolbarTitleAlignment, letting us override the automatic, context-dependent title alignment. Unfortunately, I can't get it to work on either a regular iPhone or Duo. FB25200141

The docs also include several new APIs for HomeView. Since SwiftUI can currently only be used on HomeView through widgets, Live Activities, and CarPlay, I’m curious to see how these new APIs will work in practice.

Another addition is homeEmbeddedNavigationDestination, similar to navigationDestination. It seems to use a system-managed navigation stack rather than one we define ourselves. developer.apple.com/documentatio...

developer.apple.comhomeEmbeddedNavigationDestination(for:destination:) | Apple Developer DocumentationDrop-in replacement for .navigationDestination(for:) for hosted extension content. Pair with context.navigator.push(_:title:) or NavigationLink(value:).

0 reposts0 likes

Similar modifiers are available for Core Location (locationHeadingAnchor) and Core Motion (deviceMotionAnchor), letting us use SwiftUI views as reference points for location heading and device motion.

All in all, some handy new additions for Duo and HomeView, with ContentMarginGuide being my personal highlight. Happy coding!