RSSAmplifier

Blog

Nil Coalescing

We are a software development company based in New Zealand passionate about iOS and macOS app development.

nilcoalescing.comRSS feed ↗100 posts

Latest posts

Creating multi-step animations with PhaseAnimator in SwiftUI

Build repeating and event-driven animations in SwiftUI with PhaseAnimator, using phase values and per-phase transitions to control each sequence.

Adaptive SwiftUI toolbars in iOS 27

Control which SwiftUI toolbar actions stay visible, move commands into overflow, pin an important item and configure navigation bar minimization with the new iOS 27 APIs.

Alignment guides in SwiftUI

Learn how alignment guides position views in SwiftUI, how to override a built-in guide, and how to define a custom alignment for views in nested containers.

Tracking value sources to prevent recursive SwiftUI updates

Use SwiftUI transaction values to identify updates made by wrapped UITextView and NSTextView editors, preventing the same values from being applied again when SwiftUI sends them back.

Keeping canvas interactions responsive with frame reprojection

Keep a complex Metal-rendered canvas responsive during pan, zoom and rotation gestures by reprojecting rendered states with CAMetalLayer.

Blend modes in SwiftUI

Explore every SwiftUI blend mode through focused visuals and practical use cases, and learn how to control which views participate in each operation.

Building adaptive non-modal panels in SwiftUI

Learn how to build a non-modal, detent-based sheet API in SwiftUI that adapts from a bottom panel in portrait to an edge-aligned panel in landscape.

Geometry, compositing and drawing groups in SwiftUI

Learn how SwiftUI's similarly named geometryGroup(), compositingGroup() and drawingGroup() modifiers affect distinct stages of animation and rendering, and when each is appropriate.

"The SwiftUI Way" book update: expanded guidance on data flow and performance

"The SwiftUI Way" has been updated with expanded guidance on SwiftUI data flow, view updates, and performance, including changes introduced in Xcode 27.

Equatable properties in @Observable classes

Prevent unnecessary SwiftUI view updates by making custom types stored in @Observable properties conform to Equatable.

The hidden cost of unstable SwiftUI environment defaults

Learn why Xcode 27 shows a warning when an @Entry declaration creates a new class instance for every fallback access, how unstable environment defaults can cause unnecessary SwiftUI view updates, and how to make them stable.

Custom bindings in SwiftUI: closures vs subscripts

Learn how closure-based bindings can affect SwiftUI view updates, and how labeled subscripts give the framework a more stable way to track changes.

AsyncImage improvements in iOS 27

iOS 27 gives AsyncImage more control over remote image loading with URLRequest support for custom headers, cache policies, and timeouts, plus the ability to provide a custom URLSession across a SwiftUI view hierarchy.

New SwiftUI APIs for reordering and drag and drop on iOS 27

Reorder items within and between custom SwiftUI containers, and build selection-aware multi-item drag and drop interactions with the new APIs in iOS 27.

Navigation transition updates in SwiftUI on iOS 27

SwiftUI now includes CrossFadeNavigationTransition, a built-in cross-fade navigation transition, and AnyNavigationTransition, a type-erased wrapper that allows transitions to be selected dynamically at runtime.

Custom scroll layouts with swipe actions in SwiftUI on iOS 27

iOS 27 extends support for swipe actions beyond List to any scroll container using the new swipeActionsContainer() modifier.

Initializing @Observable classes with the @State macro in Xcode 27

SwiftUI's @State changes from a property wrapper to a macro in Xcode 27, gaining lazy evaluation of the initial value and fixing unnecessary @Observable model initialization on view recreation.

Styling measurement unit fonts in SwiftUI

Use the AttributedString API to build a reusable Text initializer that applies a distinct font to the unit component of a formatted measurement.

SwiftUI animation timing

Review the full range of animation timing options available in SwiftUI, including easing curves, spring animations, the CustomAnimation protocol, and animation modifiers.

Clearing UserDefaults during macOS app development

Use the defaults Terminal command to clear persisted values and test onboarding, settings, and fresh app state.

Refreshing and animating views using TimelineView in SwiftUI

Build SwiftUI views that update periodically or continuously, without relying on explicit state changes, to create dynamic interfaces and visual effects.

Modern SwiftUI APIs for programmatic scrolling

Master programmatic scroll control in SwiftUI using defaultScrollAnchor(_:), scrollPosition(_:anchor:), and ScrollPosition to configure, drive, and read scroll position in your apps.

A guide to macOS window toolbar styles in SwiftUI

Customize the appearance of the macOS window toolbar in SwiftUI using scene and view modifiers to control its layout, title visibility, and background.

Scheduling and handling background app refresh in SwiftUI

Configure a SwiftUI app to schedule and handle a background fetch task using the Background Tasks framework and the backgroundTask(_:action:) SwiftUI modifier.

Overview of the onChange() modifier in SwiftUI

Explore the different variants of the onChange() modifier in SwiftUI, including how to access old and new values, trigger the action on initial render, and run asynchronous code in the action closure.

Embedding SF Symbols in SwiftUI Text

Combine text with icons and style them using modifiers in SwiftUI by leveraging LocalizedStringKey interpolation.

The SwiftUI Way: patterns and anti-patterns for production apps

"The SwiftUI Way" is a new book by Natalia Panferova that shows experienced SwiftUI developers how to align with the framework's internal expectations.

Adjusting line height in SwiftUI on iOS 26

iOS 26 introduces the lineHeight(_:) modifier and AttributedString.LineHeight attribute for adjusting vertical spacing between lines of text in SwiftUI.

Isolate SwiftUI animations to specific attributes

Precisely scope animations to specific animatable attributes by using the animation(_:body:) API introduced in iOS 17.

Defining custom string interpolation behavior in Swift

Extend Swift’s string interpolation to define custom behavior, such as value formatting, directly inside string literals.

Animating SF Symbols in SwiftUI

Add symbol effect animations and transitions to symbol images in SwiftUI to handle icon state changes without custom drawing or animation logic.

Add an inner shadow to a symbol image in SwiftUI

Create a cut out icon effect in SwiftUI by applying a foreground style with an inner shadow to an SF Symbol image.

Initializing @Observable classes within the SwiftUI hierarchy

Learn the recommended ways to initialize and store @Observable classes in SwiftUI views, and see what can go wrong when observable state is managed incorrectly.

Automatic property observation in UIKit with @Observable

UIKit now has native support for Swift Observation, automatically tracking reads of @Observable properties in update methods, making it easier to share data between UIKit and integrated SwiftUI components.

ScrollView snapping in SwiftUI

Explore SwiftUI APIs for customizing scroll behavior, including paging and view-aligned snapping, and learn what to watch out for to avoid unexpected results.

Add a Close button to SwiftUI modals on iOS 26

In iOS 26, SwiftUI introduces a new close button role for dismissing informational views, automatically showing a standard close icon without needing a custom label.

"SwiftUI Fundamentals" book update: refreshed for iOS 26 and the Liquid Glass design

"SwiftUI Fundamentals" by Natalia Panferova has been updated for iOS 26 with refreshed visuals and examples reflecting the new Liquid Glass design.

Show icons only in SwiftUI swipe actions on iOS 26

Starting with iOS 26, SwiftUI shows both title and icon in swipe action buttons by default, but the previous icon-only appearance can be restored using the labelStyle() modifier.

Avoiding text truncation in SwiftUI with Dynamic Type

Prevent unnecessary text truncation at larger text sizes with the fixedSize(horizontal:vertical:) modifier, forcing the text to expand vertically as needed.

Introducing Breve: an arty coffee app built for iOS 26

Take a closer look at my new app Breve, exploring the technical insights around Liquid Glass design, iOS 26 SwiftUI APIs, and system integrations.

SwiftUI Liquid Glass sheets with NavigationStack and Form

Configure the NavigationStack and Form background in SwiftUI so partial height sheets keep the translucent Liquid Glass appearance on iOS 26.

Corner concentricity in SwiftUI on iOS 26

Make your views and controls fit perfectly within their containers using new SwiftUI APIs in iOS 26 such as the ConcentricRectangle shape and the containerShape() view modifier.

Core Spotlight integration for Spotlight and internal app search

Use a shared Core Spotlight search index to make content discoverable in system Spotlight and support internal search within the app.

SwiftUI Search Enhancements in iOS and iPadOS 26

Take advantage of the updated search placement and behavior in iOS 26, and implement toolbar and tab bar search patterns that adapt across devices and integrate with the new Liquid Glass design.

Presenting Liquid Glass sheets in SwiftUI on iOS 26

Learn how to leverage the new glass appearance for partial sheets in iOS 26, and set up morphing transitions for sheets presented from toolbar buttons using SwiftUI APIs.

Schedule a countdown timer with AlarmKit

Step through the essential setup for AlarmKit timers in iOS 26, from requesting authorization and scheduling a countdown to presenting the Live Activity and an in-app list of active timers.

Using enumerated() with SwiftUI List and ForEach to show item numbers

Starting with Swift 6.2 and iOS 26, EnumeratedSequence conforms to RandomAccessCollection, allowing enumerated() to be used directly in ForEach and List views.

Stretchy header in SwiftUI with visualEffect()

Build a stretchy image header in SwiftUI using the visualEffect() modifier, scaling the image on pull-down without tracking scroll offset or modifying its frame.

Create immersive backgrounds in SwiftUI with backgroundExtensionEffect()

The new backgroundExtensionEffect() modifier in iOS 26 lets us extend and blur visual content beyond a view’s bounds, creating continuous backgrounds behind elements like sidebars, inspectors, and overlay controls.

Enable scrolling based on content size in SwiftUI

Support large accessibility text by wrapping content in a scroll view, and prevent unnecessary bounce by enabling scrolling only when the content doesn’t exceed the screen size.