Latest Updates
Read my latest articles. Browse the archives. Follow the RSS feed. Subscribe to the newsletter to get the latest posts direct to your inbox.
-
Network Path Monitoring
How do you use the NWPathMonitor to monitor network availability?
-
SwiftUI Importing And Exporting Files
How do you import and export files with SwiftUI?
-
Accessing Security Scoped Files
Your app cannot directly access files that are outside its own container. If you try to access external files, like those stored in iCloud, you’ll get a permissions error. To make those files accessible you need to work with security scopes.
-
Using Swift Reflection
I’ve never made much use of advanced Swift features like reflection. Here’s a couple of situations where I found it useful.
-
Converting A Swift String To A Bool
What’s the best way to convert a Swift String to a Bool?
-
Custom Sort Comparators
Are you using SwiftUI table views with a row model that’s a value type? Frustrated by the lack of support for sorting columns for common types like optional strings and booleans? You need a custom sort comparator.
-
Context Menus for Tables
Starting in iOS 16, you can customise the context menus you add to lists and tables based on what’s selected.
-
SwiftUI Tables Quick Guide
Multi-column tables have long been a feature of macOS. SwiftUI added support for them in macOS 12.0. They came to iOS a year later in iOS 16. There are some caveats and sharp edges to be aware of if you’re thinking of using them.