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.| Nil Coalescing
Use a shared Core Spotlight search index to make content discoverable in system Spotlight and support internal search within the app.| Nil Coalescing
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.| Nil Coalescing
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.| Nil Coalescing
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.| Nil Coalescing
Starting with Swift 6.2 and iOS 26, EnumeratedSequence conforms to RandomAccessCollection, allowing enumerated() to be used directly in ForEach and List views.| Nil Coalescing
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.| Nil Coalescing
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.| Nil Coalescing
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.| Nil Coalescing
Explore ways to create and customize mesh gradients in SwiftUI, including color adjustments, finer control with Bezier points, and color position animations to add variety and emphasis to your design.| Nil Coalescing
Format interpolated values like arrays of strings, measurements, and dates directly inside SwiftUI Text views using FormatStyle, and display dynamic dates using Text.DateStyle.| Nil Coalescing
Quickly split long function calls or initializers into separate lines using a built-in Xcode shortcut.| Nil Coalescing
Add a custom font to your Mac app by embedding it in the app bundle and making sure it loads correctly for use in your UI.| Nil Coalescing
Design a custom About window for your SwiftUI macOS app with a personalized layout, detailed app information, and a styled background that fits your app’s look and feel.| Nil Coalescing
"Swift Gems" by Natalia Panferova has been updated with tips from Swift 6, along with new techniques based on earlier Swift versions, covering optionals, noncopyable types, async programming, and more.| Nil Coalescing
Combining multiple SwiftUI Text views into a single text with the + operator to apply different styles can cause localization issues, making text interpolation the preferred technique for accurate translations.| Nil Coalescing
Dive into how static and dynamic dispatch work in Swift, how they affect performance, and how to control method resolution to write faster, more efficient code.| Nil Coalescing
Make SF Symbols and custom images adapt to different font sizes while maintaining layout balance, keeping key icons clear, and providing more space for higher-priority content when needed.| Nil Coalescing
Learn how to define custom environment values in SwiftUI, eliminate boilerplate with the @Entry macro in Xcode 16, and pass data through the view hierarchy efficiently.| Nil Coalescing
Set a custom background, like an image or a translucent material, for SwiftUI sheets, popovers, and full-screen covers, and explicitly control the presentation color scheme.| Nil Coalescing
Implement a high-performance lazy scrolling list in SwiftUI by efficiently reusing views for smooth scrolling with large datasets.| Nil Coalescing
Detect window focus with the appearsActive environment value to adjust UI and handle focus changes.| Nil Coalescing
"SwiftUI Fundamentals" is a new book by Natalia Panferova that explores SwiftUI’s core principles and APIs in depth. It will help you build a solid foundation for using SwiftUI effectively in your projects.| Nil Coalescing
Learn how to build a macOS menu bar app in SwiftUI using MenuBarExtra, customize its icon, hide it from the Dock, and add essential features like a quit option.| Nil Coalescing
Verify SwiftUI app state restoration using the Xcode simulator by following the correct steps, including backgrounding the app and relaunching it.| Nil Coalescing
Handle multiple concurrent WebSocket messages per connection with Django Channels.| Nil Coalescing
From: Nil Coalescing| iOS Feeds
Extend your app’s functionality to the entire macOS system by implementing services that users can access from the context menu or the Services menu in other apps.| Nil Coalescing
Starting with iOS 16.4, we can use the presentationCompactAdaptation(_:) modifier to tell SwiftUI that we prefer popover presentation even in compact size classes.| Nil Coalescing
Register your macOS app as a login item using SMAppService.| Nil Coalescing
Display grammatically correct text effortlessly with Foundation's automatic grammar agreement, handling pluralization without extra logic.| Nil Coalescing
Learn how to add Codable conformance to Swift enums, including automatic synthesis, customizations, and fully manual implementations for complex cases.| Nil Coalescing
Apply a translucent background to macOS windows using SwiftUI APIs, and adjust the toolbar background and title visibility to customize the window's appearance.| Nil Coalescing
Lighten or darken colors in SwiftUI views using the brightness(_:) modifier.| Nil Coalescing
Explore noncopyable types in Swift and learn how they enforce stricter ownership rules to avoid unintended errors and resource conflicts.| Nil Coalescing
To copy a string to the clipboard on macOS, we need to first clear it using clearContents(), unlike on iOS, where UIPasteboard automatically overwrites the existing data.| Nil Coalescing
SwiftUI provides a simple way to set a view's background to a shape, like a capsule or rounded rectangle, using the background(_:in:fillStyle:) modifier.| Nil Coalescing
Learn how to use matchedGeometryEffect() in SwiftUI to animate a capsule background that highlights the selected option in a custom segmented control.| Nil Coalescing
With iOS 18, we can now use SwiftUI animations to animate UIKit views, making it easier to bring SwiftUI’s expressive and flexible animations into UIKit projects.| Nil Coalescing
Configure a file target membership in Xcode to restrict it to specific platforms, avoiding the need for conditional compilation checks when the file contains platform-specific code.| Nil Coalescing
Learn how to resolve the issue of using lazy variables in @Observable classes by annotating them with @ObservationIgnored.| Nil Coalescing
Xcode 16 introduced the @Previewable macro, making it easier to preview SwiftUI views with bindings.| Nil Coalescing
"Integrating SwiftUI into UIKit Apps" book updated for iOS 18 and Xcode 16| Nil Coalescing
Font modifiers in SwiftUI let us style text directly at the font level, offering precise control over typography in our apps.| Nil Coalescing
Use localizedStandardRange(of:) in Swift for flexible, locale-aware, case and accent-insensitive string searches, providing a user experience similar to system-wide searches.| Nil Coalescing
Explore different ways to work with SwiftUI environment, including reading and setting values, creating custom environment keys, and using the environment to pass down actions and observable classes.| Nil Coalescing
Sorting arrays in Swift can be made more concise and readable by using comparison operators as closures in the sorted(by:) method.| Nil Coalescing
Discover how to use the @Observable macro in SwiftUI and its advantages over ObservableObject, such as more efficient view updates and simplified code management.| Nil Coalescing
This post explains how to use recursive enums in Swift, including the indirect keyword, to effectively model and manage complex, hierarchical data structures.| Nil Coalescing
A simple method for rendering quadratic Bézier curves on the GPU in Metal without pre-processing geometry.| Nil Coalescing
Efficiently count the number of elements in a sequence that satisfy the given condition with the new count(where:) method introduced in Swift 6.| Nil Coalescing
Learn how to adjust size, color, rendering modes, variable values, and design variants of SF Symbols in SwiftUI apps.| Nil Coalescing
Discover Strolly, our new free app that generates unique daily walking routes, providing variety and adventure while keeping user privacy in mind.| Nil Coalescing
Using the overlay() modifier in SwiftUI, we can elegantly wrap text within another view, ensuring the text is positioned and sized relative to the primary content.| Nil Coalescing
SwiftUI custom scenes enable the creation of modular, maintainable code, allowing for precise management of complex user interfaces and behavior across different platforms.| Nil Coalescing
Leverage the new magic replace symbol effect in iOS 18 for smooth transitions of slashes and badges in SF Symbols.| Nil Coalescing
Starting from iPadOS 18, SwiftUI now allows us to present a form sheet, similar to UIModalPresentationStyle.formSheet.| Nil Coalescing
Take advantage of the new macOS 15 API to update SwiftUI views when modified keys are pressed.| Nil Coalescing
Learn how to use MapKit and SwiftUI to apply a gradient that follows a polyline, enhancing the visual appeal of your maps.| Nil Coalescing
When we need to compare arrays based on custom criteria in Swift, we can use elementsEqual(_:by:) method. It allows us to define custom comparison logic with a closure, offering more flexibility than using == operator.| Nil Coalescing
Discover how to leverage SwiftUI's versatile scene types, like WindowGroup, DocumentGroup, Settings, Window, and MenuBarExtra, to create efficient and dynamic macOS applications.| Nil Coalescing
Use convertFromSnakeCase in JSONDecoder to automatically map JSON snake case keys to Swift camel case properties, simplifying model definitions and ensuring naming consistency.| Nil Coalescing
I recently gave a talk at Code Camp Wellington on how starting a technical blog can transform your career development. Since it wasn't recorded, I've summarized my insights in this post to inspire others to share their technical knowledge online.| Nil Coalescing
Learn how to use NWPathMonitor as an async sequence for real-time network status updates in your SwiftUI views.| Nil Coalescing
Swift's tuples are a convenient way to group multiple values, and their true utility shines with the language's built-in ability to compare tuples.| Nil Coalescing
Explore advanced Swift techniques in the newly released book "Swift Gems"| Nil Coalescing
By taking advantage of provisional authorization for notifications, we can provide a gentle introduction to our app's notifications without upfront permission from the user.| Nil Coalescing
Guide users through resolving issues and make your Swift applications more intuitive and supportive by defining user-friendly descriptions and recovery suggestions for custom errors.| Nil Coalescing
Discover how string comparison methods from Foundation outperform basic case conversion, ensuring precise, efficient, and culturally aware comparisons in our applications.| Nil Coalescing
Property observers like willSet and didSet aren't triggered during initialization in Swift, but if we need to execute logic from property observers at this stage, we can use some workarounds.| Nil Coalescing
Learn how to wrap withObservationTracking() into an AsyncStream to iterate over changes with an async for loop.| Nil Coalescing
Monitor changes to specific properties of an observable class using withObservationTracking() function from Observation framework in iOS 17.| Nil Coalescing
Use the new instance properties of the ShapeStyle in iOS 17 to access hierarchical system background styles, such as secondary and tertiary background.| Nil Coalescing
Take advantage of the new improvements in the debug console in Xcode and learn how to filter logs by type, category or message, show and hide similar items and view log metadata.| Nil Coalescing
This post will walk you through all the necessary setup so that you can enable remote push notification functionality in your iOS project.| Nil Coalescing
Add icons to buttons in actionable push notifications using the UNNotificationActionIcon class to make notifications more intuitive and visually appealing.| Nil Coalescing
Add custom foreground styles such as gradients to words inside Text view in SwiftUI in iOS 17.| Nil Coalescing
In Xcode 15 code completion we can view all the possible permutations of function parameters by pressing the right arrow key.| Nil Coalescing
The focusable() modifier now available on iPadOS 17 allows us to provide full keyboard navigation, even including custom views not focusable by default.| Nil Coalescing
Starting from iOS 17 and iPadOS 17 we can now use ControlGroup to display a horizontal collection of actions in a context menu.| Nil Coalescing
Swift 5.9 introduces the use of if/else statements as expressions, simplifying value returns, variable assignments, and enhancing code readability.| Nil Coalescing
Xcode 15 automatically generates static properties on ColorResource and ImageResource types for colors and images that we store in asset catalog. This lets us access them in SwiftUI, UIKit or AppKit code without using string literals.| Nil Coalescing
Let's look into the new inspector() presentation API in iOS 17, iPadOS 17 and macOS 14 and see how to customise its width on iPad and Mac, and how to change the sheet style it defaults to on iPhone.| Nil Coalescing
Discover the power of precise pattern matching with Swift enums as we look into using the where clause in switch statements and for-in loops, and adding extra conditions in while loops and if-case statements for more expressive code.| Nil Coalescing
Ensure that complex SwiftUI buttons have the correct blending in pressed state by applying the compositingGroup() modifier.| Nil Coalescing
Starting from Xcode 14, iOS simulator can generate a device token, allowing us to test remote push notifications coming from a server without a real device or a need to use .apns payload files and simctl push command.| Nil Coalescing
Explore how to replace the position() modifier with a custom AnchoredPosition layout to improve flexibility in aligning views relative to an anchor point, and adjust the alignment dynamically based on available space.| Nil Coalescing
Learn about different use cases for foregroundColor(), foregroundStyle() and tint() modifiers in SwiftUI to be able to choose the right API for the right purpose.| Nil Coalescing
Build an interactive bar chart in Swift Charts that displays detailed annotations when the user is hovering over bar marks.| Nil Coalescing
Enable modified actions, such as command + click or shift + click, in a SwiftUI lifecycle application on iPad using GCKeyboard from the Game Controller framework.| Nil Coalescing
Register when the pointer enters and exists view's bounds and get the mouse cursor location with onContinuousHover() modifier.| Nil Coalescing
Adjust the the default appearance of the ShareLink button using SwiftUI view modifiers such as labelStyle(), imageScale() and symbolVariant().| Nil Coalescing
Find out how text modifiers are different from view modifiers in SwiftUI and how we can use them in our code to style portions of text.| Nil Coalescing
When we add an image name to a Localizable.strings file, SwiftUI automatically uses it for the image accessibility label.| Nil Coalescing
Define custom sizing logic for UIViewRepresentable views in SwiftUI apps with the new iOS 16 sizeThatFits() API.| Nil Coalescing
Create a chart with the Swift Charts framework to show UV index throughout the day inspired by the iOS Weather app that dims the area up to the current time.| Nil Coalescing
Permanently position a view at the bottom of the screen in a SwiftUI app by placing it inside the safeAreaInset() modifier.| Nil Coalescing
Use the accessibilityShowButtonShapes environment value to change the appearance of custom buttons and links embedded in Text views to make them more accessible.| Nil Coalescing
Define custom logic for matching different types of data in switch cases by overloading the Swift pattern matching operator (~=).| Nil Coalescing
Explore the practical applications and distinctions of self, Self, and Self.self in Swift, clarifying their roles in instance referencing, protocol conformance, and metatype access.| Nil Coalescing