🦜 Nil Coalescing
@nilcoalescing.com@rss-parrot.net
I'm an automated parrot! I relay a website's RSS feed to the Fediverse. Every time a new post appears in the feed, I toot about it. Follow me to get all new posts in your Mastodon timeline!
Brought to you by the RSS Parrot.
---
We are a software development company based in New Zealand passionate about iOS and macOS app development.
Your feed and you don't want it here? Just
e-mail the birb.
Stretchy header in SwiftUI with visualEffect()
https://nilcoalescing.com/blog/StretchyHeaderInSwiftUI
Published: June 16, 2025 06:00
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()
https://nilcoalescing.com/blog/BackgroundExtensionEffectInSwiftUI
Published: June 11, 2025 06:00
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
https://nilcoalescing.com/blog/EnableScrollingBasedOnContentSizeInSwiftUI
Published: May 26, 2025 06:00
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.
Mesh gradients in SwiftUI
https://nilcoalescing.com/blog/MeshGradientsInSwiftUI
Published: May 19, 2025 06:00
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.
Formatting data inside SwiftUI Text views
https://nilcoalescing.com/blog/FormattingDataInsideSwiftUITextViews
Published: May 8, 2025 06:00
Format interpolated values like arrays of strings, measurements, and dates directly inside SwiftUI Text views using FormatStyle, and display dynamic dates using Text.DateStyle.
Format long parameter lists into separate lines in Xcode
https://nilcoalescing.com/blog/FormatLongParameterListsIntoSeparateLinesInXcode
Published: May 2, 2025 06:00
Quickly split long function calls or initializers into separate lines using a built-in Xcode shortcut.
Embedding a custom font into a macOS app bundle
https://nilcoalescing.com/blog/EmbeddingACustomFontIntoAMacOSAppBundle
Published: April 30, 2025 06:00
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.
Create a fully custom About window for a Mac app in SwiftUI
https://nilcoalescing.com/blog/FullyCustomAboutWindowForAMacAppInSwiftUI
Published: April 23, 2025 06:00
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.
Automatic image accessibility labels from localized strings in SwiftUI
https://nilcoalescing.com/blog/ImageAccessibilityLabelsFromLocalizableStringsFiles
Published: April 16, 2025 06:00
SwiftUI uses a localized string matching the image name as the accessibility label, without needing to apply the accessibilityLabel() modifier.
Ways to customize text color in SwiftUI
https://nilcoalescing.com/blog/ForegroundColorStyleAndTintInSwiftUI
Published: April 15, 2025 06:00
SwiftUI offers several methods to change the color of text, including foregroundStyle() and tint() modifiers, AttributedString attributes, and the textRenderer() API for advanced styling.
"Swift Gems" book update: new techniques from recent and past Swift releases
https://nilcoalescing.com/blog/SwiftGemsUpdateApril2025
Published: April 8, 2025 06:00
"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.
Text concatenation vs Text interpolation in SwiftUI
https://nilcoalescing.com/blog/TextConcatenationVsTextInterpolationInSwiftUI
Published: April 1, 2025 05:00
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.
Method dispatch mechanisms in Swift: static and dynamic dispatch
https://nilcoalescing.com/blog/MethodDispatchMechanismsInSwift
Published: March 28, 2025 05:00
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.
Adapting images and symbols to Dynamic Type sizes in SwiftUI
https://nilcoalescing.com/blog/AdaptingImagesAndSymbolsToDynamicTypeSizesInSwiftUI
Published: March 21, 2025 05:00
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.
Custom environment values in SwiftUI
https://nilcoalescing.com/blog/CustomEnvironmentValuesInSwiftUI
Published: March 13, 2025 05:00
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.
Customizing modal presentation background and color scheme in SwiftUI
https://nilcoalescing.com/blog/ModalPresentationBackgroundAndColorSchemeInSwiftUI
Published: March 7, 2025 06:00
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.
Designing a custom lazy list in SwiftUI with better performance
https://nilcoalescing.com/blog/CustomLazyListInSwiftUI
Published: March 3, 2025 05:00
Implement a high-performance lazy scrolling list in SwiftUI by efficiently reusing views for smooth scrolling with large datasets.
Detecting the focused window on macOS in SwiftUI
https://nilcoalescing.com/blog/DetectFocusedWindowOnMacOS
Published: March 1, 2025 05:00
Detect window focus with the appearsActive environment value to adjust UI and handle focus changes.
SwiftUI Fundamentals: a deeper look into the framework
https://nilcoalescing.com/blog/SwiftUIFundamentalsReleaseAnnouncement
Published: February 18, 2025 05:00
"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.
Build a macOS menu bar utility in SwiftUI
https://nilcoalescing.com/blog/BuildAMacOSMenuBarUtilityInSwiftUI
Published: February 13, 2025 05:00
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.
Testing SceneStorage state persistence in Xcode
https://nilcoalescing.com/blog/TestingSceneStorageStatePersistenceInXcode
Published: February 5, 2025 03:00
Verify SwiftUI app state restoration using the Xcode simulator by following the correct steps, including backgrounding the app and relaunching it.
Capture UUID values with regex in Swift
https://nilcoalescing.com/blog/CaptureUUIDValuesWithRegex
Published: February 2, 2025 05:00
Build reusable, type-safe components for extracting and validating UUID values using Swift's RegexBuilder framework.
Managing WebSocket messages concurrently with detached actions
https://nilcoalescing.com/blog/DetachedActionsInDjangoChannelsRestFramework
Published: January 29, 2025 05:00
Handle multiple concurrent WebSocket messages per connection with Django Channels.
Provide macOS system-wide services from your app
https://nilcoalescing.com/blog/macOSSystemWideServices
Published: January 28, 2025 05:00
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.
Show a popover on iPhone in SwiftUI
https://nilcoalescing.com/blog/PopoverOniPhoneInSwiftUI
Published: January 24, 2025 05:00
Starting with iOS 16.4, we can use the presentationCompactAdaptation(_:) modifier to tell SwiftUI that we prefer popover presentation even in compact size classes.
Add launch at login setting to a macOS app
https://nilcoalescing.com/blog/LaunchAtLoginSetting
Published: January 17, 2025 05:00
Register your macOS app as a login item using SMAppService.
Handle plurals in SwiftUI Text views with inflection
https://nilcoalescing.com/blog/HandlePluralsInSwiftUITextViewsWithInflection
Published: January 13, 2025 05:00
Display grammatically correct text effortlessly with Foundation's automatic grammar agreement, handling pluralization without extra logic.
Codable conformance for Swift enums
https://nilcoalescing.com/blog/CodableConformanceForSwiftEnums
Published: January 7, 2025 05:00
Learn how to add Codable conformance to Swift enums, including automatic synthesis, customizations, and fully manual implementations for complex cases.
Customizing macOS window background in SwiftUI
https://nilcoalescing.com/blog/CustomizingMacOSWindowBackgroundInSwiftUI
Published: December 30, 2024 06:00
Apply a translucent background to macOS windows using SwiftUI APIs, and adjust the toolbar background and title visibility to customize the window's appearance.
Adjust the intensity of colors in SwiftUI views
https://nilcoalescing.com/blog/AdjustTheIntensityOfColorsInSwiftUIViews
Published: December 19, 2024 05:00
Lighten or darken colors in SwiftUI views using the brightness(_:) modifier.
Noncopyable types in Swift
https://nilcoalescing.com/blog/NoncopyableTypesInSwift
Published: December 16, 2024 05:00
Explore noncopyable types in Swift and learn how they enforce stricter ownership rules to avoid unintended errors and resource conflicts.
Copy a string to the clipboard in Swift on macOS
https://nilcoalescing.com/blog/CopyStringToClipboardInSwiftOnMacOS
Published: December 7, 2024 22:00
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.
Set a shape as background in SwiftUI
https://nilcoalescing.com/blog/SetAShapeAsBackgroundInSwiftUI
Published: December 5, 2024 22:00
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.
SwiftUI matched geometry effect in a custom segmented control
https://nilcoalescing.com/blog/CustomSegmentedControlWithMatchedGeometryEffect
Published: December 1, 2024 06:00
Learn how to use matchedGeometryEffect() in SwiftUI to animate a capsule background that highlights the selected option in a custom segmented control.
Animate UIKit views with SwiftUI animations in iOS 18
https://nilcoalescing.com/blog/AnimateUIKitViewsWithSwiftUIAnimations
Published: November 28, 2024 06:00
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.
Set supported platforms in file target membership options in Xcode
https://nilcoalescing.com/blog/SetSupportedPlatformsInFileTargetMembershipOptionsInXcode
Published: November 25, 2024 06:00
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.
Lazy vars in @Observable classes in Swift
https://nilcoalescing.com/blog/LazyVarsInObservableClasses
Published: November 19, 2024 06:00
Learn how to resolve the issue of using lazy variables in @Observable classes by annotating them with @ObservationIgnored.
Preview SwiftUI views with bindings using @Previewable
https://nilcoalescing.com/blog/PreviewSwiftUIViewsWithBindings
Published: November 13, 2024 05:00
Xcode 16 introduced the @Previewable macro, making it easier to preview SwiftUI views with bindings.
"Integrating SwiftUI into UIKit Apps" book updated for iOS 18 and Xcode 16
https://nilcoalescing.com/blog/IntegratingSwiftUIUpdate2024
Published: November 9, 2024 01:00
"Integrating SwiftUI into UIKit Apps" by Natalia Panferova has been updated, featuring the latest tools like Observable, the Preview macro, and a new section on animating UIKit views with SwiftUI animations in iOS 18.
Font modifiers in SwiftUI
https://nilcoalescing.com/blog/FontModifiersInSwiftUI
Published: October 28, 2024 05:00
Font modifiers in SwiftUI let us style text directly at the font level, offering precise control over typography in our apps.
User-level string search in Swift
https://nilcoalescing.com/blog/UserLevelStringSearchInSwift
Published: October 22, 2024 03:00
Use localizedStandardRange(of:) in Swift for flexible, locale-aware, case and accent-insensitive string searches, providing a user experience similar to system-wide searches.
SwiftUI Environment
https://nilcoalescing.com/blog/SwiftUIEnvironment
Published: October 4, 2024 03:00
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.
Sorting arrays in Swift using comparison operators as closures
https://nilcoalescing.com/blog/SortingArraysInSwiftUsingComparisonOperators
Published: August 30, 2024 10:00
Sorting arrays in Swift can be made more concise and readable by using comparison operators as closures in the sorted(by:) method.
Using @Observable in SwiftUI views
https://nilcoalescing.com/blog/ObservableInSwiftUI
Published: August 23, 2024 07:00
Discover how to use the @Observable macro in SwiftUI and its advantages over ObservableObject, such as more efficient view updates and simplified code management.
Recursive enums in Swift
https://nilcoalescing.com/blog/RecursiveEnumsInSwift
Published: August 15, 2024 07:00
This post explains how to use recursive enums in Swift, including the indirect keyword, to effectively model and manage complex, hierarchical data structures.
Rendering quadratic Bézier curves with Metal
https://nilcoalescing.com/blog/RenderingQuadraticBezierCurvesWithMetal
Published: August 5, 2024 08:00
A simple method for rendering quadratic Bézier curves on the GPU in Metal without pre-processing geometry.
Count the number of objects that pass a test in Swift using count(where:)
https://nilcoalescing.com/blog/CountTheNumberOfObjectsThatPassATestInSwift
Published: August 2, 2024 07:00
Efficiently count the number of elements in a sequence that satisfy the given condition with the new count(where:) method introduced in Swift 6.
Customizing the appearance of symbol images in SwiftUI
https://nilcoalescing.com/blog/CustomizingTheAppearanceOfSymbolImagesInSwiftUI
Published: July 22, 2024 07:00
Learn how to adjust size, color, rendering modes, variable values, and design variants of SF Symbols in SwiftUI apps.
Introducing Strolly - our new app for fresh daily walks
https://nilcoalescing.com/blog/IntroducingStrolly
Published: July 3, 2024 05:00
Discover Strolly, our new free app that generates unique daily walking routes, providing variety and adventure while keeping user privacy in mind.
Wrapping text within another view in SwiftUI
https://nilcoalescing.com/blog/WrappingTextWithinAnotherViewInSwiftUI
Published: June 27, 2024 07:00
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.
Defining custom scenes in SwiftUI
https://nilcoalescing.com/blog/CustomScenesInSwiftUI
Published: June 19, 2024 07:00
SwiftUI custom scenes enable the creation of modular, maintainable code, allowing for precise management of complex user interfaces and behavior across different platforms.
Enhanced replace transition for SF Symbols in iOS 18
https://nilcoalescing.com/blog/EnhancedReplaceTransitionForSFSymbolsInIOS18
Published: June 13, 2024 01:00
Leverage the new magic replace symbol effect in iOS 18 for smooth transitions of slashes and badges in SF Symbols.
SwiftUI sheet sizing updates on iPadOS 18
https://nilcoalescing.com/blog/FormSheetInSwiftUI
Published: June 12, 2024 01:00
Sheet sizing became more flexible in SwiftUI on iPadOS 18, with the default size now matching a form sheet and presentationSizing() allowing explicit size customizations.
Responding to keyboard modifiers on macOS in SwiftUI
https://nilcoalescing.com/blog/RespondingToModifierKeys
Published: June 11, 2024 06:00
Take advantage of the new macOS 15 API to update SwiftUI views when modifier keys are pressed.
Creating gradient on polylines in SwiftUI MapKit
https://nilcoalescing.com/blog/GradientOnPolylinesInSwiftUIMapKit
Published: June 5, 2024 06:00
Learn how to use MapKit and SwiftUI to apply a gradient that follows a polyline, enhancing the visual appeal of your maps.
Compare arrays based on custom criteria
https://nilcoalescing.com/blog/CompareArraysBasedOnCustomCriteria
Published: June 3, 2024 06:00
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.
Scenes types in a SwiftUI Mac app
https://nilcoalescing.com/blog/ScenesTypesInASwiftUIMacApp
Published: May 28, 2024 07:00
Discover how to leverage SwiftUI's versatile scene types, like WindowGroup, DocumentGroup, Settings, Window, and MenuBarExtra, to create efficient and dynamic macOS applications.
Auto-convert JSON snake case to Swift camel case properties
https://nilcoalescing.com/blog/AutoConvertJsonSnakeCaseToSwiftCamelCaseProperties
Published: May 20, 2024 04:00
Use convertFromSnakeCase in JSONDecoder to automatically map JSON snake case keys to Swift camel case properties, simplifying model definitions and ensuring naming consistency.
Starting and growing your own technical blog
https://nilcoalescing.com/blog/StartingAndGrowingYourOwnTechnicalBlog
Published: May 18, 2024 06:00
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.
React to network status updates in SwiftUI
https://nilcoalescing.com/blog/ReactToNetworkStatusUpdatesInSwiftUI
Published: May 16, 2024 06:00
Learn how to use NWPathMonitor as an async sequence for real-time network status updates in your SwiftUI views.
Streamline multi-criteria data sorting and organization with tuples
https://nilcoalescing.com/blog/MultiCriteriaDataSortingWithTuples
Published: May 15, 2024 01:00
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.
Explore advanced Swift techniques in the latest book "Swift Gems"
https://nilcoalescing.com/blog/SwiftGemsReleaseAnnouncement
Published: May 11, 2024 02:00
"Swift Gems" is a new book by Natalia Panferova for seasoned Swift developers. It offers over 100 tips and techniques to improve code efficiency and robustness, ideal for those looking to advance their Swift expertise.
Sending trial notifications with provisional authorization on iOS
https://nilcoalescing.com/blog/TrialNotificationsWithProvisionalAuthorizationOnIOS
Published: March 19, 2024 06:00
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.
User-friendly descriptions and recovery suggestions for custom errors in Swift
https://nilcoalescing.com/blog/UserFriendlyDescriptionsAndRecoverySuggestionsForCustomErrorsInSwift
Published: February 18, 2024 09:00
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.
Use cases for self, Self and Self.self in Swift
https://nilcoalescing.com/blog/UseCasesForSelfInSwift
Published: January 28, 2024 02:00
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.
Case insensitive string comparison in Swift
https://nilcoalescing.com/blog/CaseInsensitiveStringComparisonInSwift
Published: January 21, 2024 02:00
Discover how string comparison methods from Foundation outperform basic case conversion, ensuring precise, efficient, and culturally aware comparisons in our applications.
Pattern matching for custom types in Swift
https://nilcoalescing.com/blog/PatternMatchingForCustomTypesInSwift
Published: December 22, 2023 06:00
Define custom logic for matching different types of data in switch cases by overloading the Swift pattern matching operator (~=).
Trigger property observers from initializers in Swift
https://nilcoalescing.com/blog/TriggerPropertyObserversFromInitializersInSwift
Published: December 17, 2023 05:00
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.
Create an AsyncStream from withObservationTracking() function
https://nilcoalescing.com/blog/AsyncStreamFromWithObservationTrackingFunc
Published: November 25, 2023 05:00
Learn how to wrap withObservationTracking() into an AsyncStream to iterate over changes with an async for loop.
Using Observation framework outside of SwiftUI
https://nilcoalescing.com/blog/ObservationFrameworkOutsideOfSwiftUI
Published: November 22, 2023 05:00
Monitor changes to specific properties of an observable class using withObservationTracking() function from Observation framework in iOS 17.
Hierarchical background styles in SwiftUI
https://nilcoalescing.com/blog/HierarchicalBackgroundStyles
Published: November 5, 2023 05:00
Use the new instance properties of the ShapeStyle in iOS 17 to access hierarchical system background styles, such as secondary and tertiary background.
Filtering logs in Xcode 15
https://nilcoalescing.com/blog/FilteringLogsInXcode15
Published: October 23, 2023 06:00
Take advantage of the 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.
iOS app setup for remote push notifications
https://nilcoalescing.com/blog/RemotePushSetup
Published: August 16, 2023 07:00
This post will walk you through all the necessary setup so that you can enable remote push notification functionality in your iOS project.
Notification action buttons with images in iOS
https://nilcoalescing.com/blog/NotificationActionButtonsWithImages
Published: August 7, 2023 01:00
Add icons to buttons in actionable push notifications using the UNNotificationActionIcon class to make notifications more intuitive and visually appealing.
Interpolate text with custom foreground style in SwiftUI
https://nilcoalescing.com/blog/ForegroundStyleInsideTextInSwiftUI
Published: June 13, 2023 01:00
Add custom foreground styles, such as gradients, to words inside Text views in SwiftUI.
See all parameter permutations in code completion in Xcode 15
https://nilcoalescing.com/blog/ParameterPermutationsInXcode15Autocomplete
Published: June 11, 2023 01:00
In Xcode 15 code completion we can view all the possible permutations of function parameters by pressing the right arrow key.
Keyboard driven navigation with focusable() on iPad in SwiftUI
https://nilcoalescing.com/blog/KeyboardNavigationWithFocusable
Published: June 8, 2023 04:00
The focusable() modifier available since iPadOS 17 allows us to provide full keyboard navigation, even including custom views not focusable by default.
ControlGroup in context menus in SwiftUI
https://nilcoalescing.com/blog/ControlGroupInContextMenus
Published: June 7, 2023 04:00
Starting from iOS 17 and iPadOS 17 we can use ControlGroup to display a horizontal collection of actions in a context menu.
if/else statements as expressions in Swift
https://nilcoalescing.com/blog/IfElseExpressionsInSwift
Published: June 7, 2023 01:00
Swift 5.9 introduced the use of if/else statements as expressions, simplifying value returns, variable assignments, and enhancing code readability.
Access colors and images from asset catalog via static properties in Xcode 15
https://nilcoalescing.com/blog/Xcode15Assets
Published: June 6, 2023 06:00
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.
Inspectors in SwiftUI
https://nilcoalescing.com/blog/InspectorInSwiftUI
Published: June 6, 2023 05:00
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.
Swift enum pattern matching with extra conditions
https://nilcoalescing.com/blog/SwiftEnumPatternMatchingWithExtraConditions
Published: June 4, 2023 05:00
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.
Using compositing group for unifying shapes within buttons in SwiftUI
https://nilcoalescing.com/blog/CompositingGroupInButtons
Published: June 1, 2023 08:30
Ensure that complex SwiftUI buttons have the correct blending in pressed state by applying the compositingGroup() modifier.
Testing remote push notifications on iOS simulator
https://nilcoalescing.com/blog/TestingRemotePushOniOSSimulator
Published: May 24, 2023 01:00
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.
Using Layout protocol to align explicitly positioned views in SwiftUI
https://nilcoalescing.com/blog/AnchoredPositionInSwiftUI
Published: May 22, 2023 08:00
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.
Show chart annotations on hover in Swift Charts
https://nilcoalescing.com/blog/ChartAnnotationsOnHover
Published: February 24, 2023 00:00
Build an interactive bar chart in Swift Charts that displays detailed annotations when the user is hovering over bar marks.
Reading keyboard modifiers on iPad in SwiftUI
https://nilcoalescing.com/blog/ReadingKeyboardModifiers
Published: February 17, 2023 05:00
Enable modified actions, such as command + click or shift + click, in a SwiftUI lifecycle application on iPad using GCKeyboard from the Game Controller framework.
Tracking hover location in SwiftUI
https://nilcoalescing.com/blog/TrackingHoverLocationInSwiftUI
Published: February 6, 2023 05:00
Register when the pointer enters and exists view's bounds and get the mouse cursor location with onContinuousHover() modifier.
Customize ShareLink appearance in SwiftUI with view modifiers
https://nilcoalescing.com/blog/CustomizeShareLinkAppearance
Published: January 23, 2023 05:00
Adjust the default appearance of the ShareLink button using SwiftUI view modifiers such as labelStyle(), imageScale() and symbolVariant().
Text modifiers in SwiftUI
https://nilcoalescing.com/blog/TextModifiersInSwiftUI
Published: January 12, 2023 05:00
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.
Provide custom size for UIViews wrapped in UIViewRepresentable
https://nilcoalescing.com/blog/CustomSizeForUIViewsWrappedInUIViewRepresentable
Published: November 29, 2022 07:00
Define custom sizing logic for UIViewRepresentable views in SwiftUI apps with the new iOS 16 sizeThatFits() API.
Area chart with a dimming layer up to the current point in time
https://nilcoalescing.com/blog/AreaChartWithADimmingLayer
Published: November 23, 2022 00:00
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.
Pin a view to the bottom of safe area in SwiftUI
https://nilcoalescing.com/blog/PinAViewToTheBottomOfSafeArea
Published: November 10, 2022 07:00
Permanently position a view at the bottom of the screen in a SwiftUI app by placing it inside the safeAreaInset() modifier.
Adjust SwiftUI controls for the Button Shapes accessibility setting
https://nilcoalescing.com/blog/ButtonShapesSetting
Published: November 3, 2022 07:00
Use the accessibilityShowButtonShapes environment value to change the appearance of custom buttons and links embedded in Text views to make them more accessible.
Check localizable strings with the accented pseudolanguage in Xcode
https://nilcoalescing.com/blog/CheckLocalizableStringsWithAccentedPseudolanguage
Published: October 28, 2022 00:00
Make sure that all of the necessary strings are localizable in a SwiftUI app by previewing your UI in the accented pseudolanguage.
Fill bar marks with gradient in Swift Charts
https://nilcoalescing.com/blog/FillBarMarksWithGradient
Published: October 26, 2022 00:00
Add a gradient to a bar chart that stretches from top to bottom of the plot area rather than filling each individual mark.
Exporting and importing localizations in a SwiftUI app
https://nilcoalescing.com/blog/ExportingAndImportingLocalizations
Published: October 18, 2022 00:00
Generate xcloc files that can be sent to translators directly from SwiftUI code and import translations back to create Localizable.strings files.
Using the dismiss action from the SwiftUI environment
https://nilcoalescing.com/blog/UsingTheDismissActionFromTheSwiftUIEnvironment
Published: October 6, 2022 00:00
Programmatically dismiss presentations and pop views from the navigation stack in both pure SwiftUI and hybrid UIKit/SwiftUI apps with the help of the dismiss action.
Dynamic dates with monospaced digits in SwiftUI
https://nilcoalescing.com/blog/DynamicDatesWithMonospacedDigits
Published: September 27, 2022 00:00
Display a self-updating date and time inside a SwiftUI Text view and prevent the UI from moving as the digits in the date change.
Editable navigation titles in SwiftUI on iOS 16
https://nilcoalescing.com/blog/EditableNavigationTitlesInSwiftUIoniOS16
Published: September 16, 2022 01:00
Let users rename items from the navigation title in the toolbar using the new navigationTitle() modifier that takes a binding.
~ 2 additional posts are not shown ~