Swift Closures Field Notes
A cheat sheet of Swift closure snippets and examples I've collected over time to help get syntax and usage right the first time.
SwiftA visual reference to SwiftUI DatePicker styling for iOS and macOS
SwiftUI's date picker provides a wide range of visual selection functionality and style choices. This post provides a visual reference to the actual UI appearance created by various picker configurations.
SwiftUICreating an iOS bar chart in code using Swift
Displaying data in a chart is a common task in an iOS application. In this tutorial I'll demonstrate how to use Swift to create a resizable, dynamic bar chart composed of UIView elements with Auto Layout constraints entirely in code.
UIKitSwift String Field Notes
A cheat sheet of snippets and examples I've collected over time of using Apple's String class and related string processing and string manipulation techniques
SwiftUsing automatic API request retries make iOS apps more resilient
In a perfect world every network request will succeed on the first try. But in the real-world, not every API request succeeds. This post covers a technique to build automatic retries into an iOS or macOS client application.
SwiftSwift Dictionary Field Notes
A cheat sheet of snippets and examples I've collected over time of using Apple's Foundation Dictionary class.
SwiftUsing DispatchGroup in SwiftUI to coordinate UI updates
This post covers how to use the Grand Central Dispatch's DispatchGroup object to coordinate separate web requests so that UI updates can be completed at the same time, even when asynchronous requests aren't guaranteed to return in a predictable order.
SwiftSwift high-order reduce usage with custom types
Swift's .reduce provides a powerful high-order function to perform analysis of sequences and collections. This post is a cheat sheet for using .reduce to perform various kinds of numerical analysis.
SwiftSwift high-order map usage with custom types
This post is a cheat sheet for various uses of the Swift high-order map, flatMap and compactMap used with custom Types.
SwiftSorting collections of custom types using higher order functions in Swift
While sorting simple types are covered well in Apple's documentation on the subject and in many other places, I've focused below on sorting custom object types
Swift