
Before iOS 27, swipeActions(edge:allowsFullSwipe:content:) only worked on rows inside a List. Applying it to views in a LazyVStack, a LazyVGrid, or a custom layout had no effect. iOS 27 removes that restriction with a new modifier, swipeActionsContainer(), that activates swipe action support for any container inside a scroll view.
We have to apply the new swipeActionsContainer() modifier directly to the ScrollView and then add swipeActions(edge:allowsFullSwipe:content:) to each row inside it.
Xcode 27 beta is out, and it comes with a range of SwiftUI and Swift updates and improvements. The first thing that caught my eye is a change to @State. Up until now it was a property wrapper conforming to the DynamicProperty protocol, but in Xcode 27 it becomes a Swift macro. In this post we will look at what the change means for @Observable models stored in @State.
By default, SwiftUI's Text view renders formatted measurements as a uniform string and applies the same font and style to both the value and the unit. In some situations we might want to style the unit differently from the value to make it less dominant, for example. We can do this using the AttributedString API.
We can build a reusable Text initializer that targets only the unit component of a formatted measurement and applies a distinct font.
The Animation type in SwiftUI describes the timing curve for a value change, controlling how quickly a value moves toward its destination and whether it overshoots before settling. We can apply it to a specific view using the animation(_:value:) modifier, or wrap a state change in withAnimation(::) to animate all affected views at once.
While building and testing a macOS app locally, values stored in UserDefaults remain between launches. This includes data stored using the UserDefaults APIs directly or data persisted via the SwiftUI's @AppStorage property wrapper. But it's often useful to clear saved values to test onboarding, restore default settings, and reproduce a fresh app state.
SwiftUI views typically update in response to data changes. TimelineView extends this model by reevaluating a view according to a timeline, making it possible to build interfaces that refresh periodically or change continuously without relying on explicit state changes.
SwiftUI includes built-in schedules for common update patterns, from minute-based refreshes to continuously changing visual effects. In this post we'll look at how these schedules work and how they can be used to drive updates in SwiftUI views.
In this post we will explore the most modern APIs that SwiftUI provides for programmatic scrolling, covering how to configure the initial scroll position of a scroll view, how to drive it programmatically, and how to read the current position back. We will also cover some of the nuances that are easy to miss. It's worth noting though, that all of these new APIs apply to ScrollView only, and ScrollViewReader remains the only native option for programmatic scrolling in lists.
The article explains how to style macOS window toolbars in SwiftUI on macOS 26. It covers toolbar layout and size (default unifiedCompact, expanded with title on its own row), hiding the window title (toolbar removing .title or showsTitle false), hiding the title bar (windowStyle .hiddenTitleBar), clearing the toolbar background (toolbarBackgroundVisibility .hidden, toolbarBackground .hidden or .clear), setting a custom toolbar background color with toolbarColorScheme, and controlling toolbar visibility (toolbarVisibility .hidden, windowToolbarFullScreenVisibility .onHover).
The article explains how to configure background app refresh in a SwiftUI app. It covers enabling background capabilities in Xcode, registering task identifiers in Info.plist, scheduling a background task with BGAppRefreshTaskRequest and setting earliestBeginDate, registering a handler using the backgroundTask(.appRefresh) scene modifier, and testing the background fetch in Xcode using a private debug command to simulate a launch.
The article explains the evolution of onChange() from iOS 14 to iOS 17+. It covers the two new signatures, the initial parameter to trigger the action on first appear, the difference between View and Scene modifiers, and how to avoid blocking the main thread with async code.
Natalia has worked in startups and large companies across Europe and New Zealand, building web and mobile applications. Before joining Nil Coalescing, she was part of the core SwiftUI team at Apple, where she focused on designing and building SwiftUI APIs. She enjoys working with Swift and sharing her knowledge with the community. Natalia also writes books for Swift and SwiftUI developers.
Join the Mobile Signal Talent Directory and make your profile visible to hiring teams searching for iOS talent.