Refactor or Rewrite? Tackling Legacy Apps

If you’ve been programming for any length of time, you’ll likely run across apps or other projects that need major work and revisions to keep going. Maybe your company acquired another company with tons of legacy code. Perhaps you just started a new gig with lots of skeletons in the proverbial closet. Or you’re anContinue reading “Refactor or Rewrite? Tackling Legacy Apps”

Accessibility Gets an Upgrade in Xcode 13 Storyboards

WWDC 2021 is behind us and there are so many new and exciting features available to us as developers. One of those areas that has been getting much more love from Apple over the last few years is accessibility. Apple has been making it simpler for developers to test key tools like Dynamic Type, DarkContinue reading “Accessibility Gets an Upgrade in Xcode 13 Storyboards”

Registering Collection View Cells in iOS 14

In my last post, I looked at handling diffable data sources with different types of object data, focusing primarily on the venerable UITableView for my examples. We looked at a simple if…else construct to swap between cell types based on the type of the item from the data source and related snapshot. While this methodContinue reading “Registering Collection View Cells in iOS 14”

Using iOS Diffable Data Sources with Different Object Types

Since iOS 13, we’ve been able to revamp the way our table and collection views work by using diffable data source classes (UITableViewDiffableDataSource and UICollectionViewDiffableDataSource respectively) and snapshots. This provides the advantage of being able to write less code for these types of views, while making our state management much more robust and less likelyContinue reading “Using iOS Diffable Data Sources with Different Object Types”

New UIDatePicker Styles in iOS 14

One of the nice new features that came out with iOS 14 were some new options around the venerable UIDatePicker. There are now some choices other than just the slot machine-style wheels! Since iOS 2.0, the original style of UIDatePicker has been the only standard UIKit option for developers looking to let users select datesContinue reading “New UIDatePicker Styles in iOS 14”

Identify Supported Images and Create Collections in SF Symbols 2

If you’ve been doing any sort of app development with iconography since iOS 13 came out, there’s a good chance you leveraged the original SF Symbols app. With around 1,600 scalable, vector-based symbols integrating with the system San Francisco font, along with guidance for creating your own symbols, it was ground-breaking in terms of providingContinue reading “Identify Supported Images and Create Collections in SF Symbols 2”

Better Uniform Type Identifiers with Xcode 12

If you’ve been doing any kind of file uploads, downloads, previews, and such in past versions of Xcode and needed to deal with MIME types or file extensions, you’ve probably had to deal with Uniform Type Identifers. Using CoreServices and some of its methods such as UTTypeCreatePreferredIdentifierForTag and UTTypeCopyPreferredTagWithClass could avoid some hard-coding of identifiersContinue reading “Better Uniform Type Identifiers with Xcode 12”

Manage Developer Disk Space Easily with macOS Big Sur

Prior to macOS 11 Big Sur, cleaning up development disk space by deleting old iOS or watchOS device support versions and Xcode caches was something of a pain, requiring command-line calls to directories scattered in a number of different places. For example to delete Xcode cache you might run something like this. You might alsoContinue reading “Manage Developer Disk Space Easily with macOS Big Sur”

Using Comparable with Enumerations in Swift 5.3

As expected, there was so much goodness in WWDC 2020 last week. From exciting new software changes in Swift UI, collection views, and much more to the anticipated move away from Intel to Apple Silicon, there was something exciting for just about everyone. For this post, I’m just going to focus on a tiny sliverContinue reading “Using Comparable with Enumerations in Swift 5.3”

Cleaning Up Swift Enumeration Evaluation

Just some quick and simple Swift stuff in this post around writing cleaner code. It’s pretty common to see a pattern like the following in existing code when evaluating enumerations. While the above code works, it’s also not very legible, is repetitive, and can be hard to maintain as well as error-prone if multiple enumContinue reading “Cleaning Up Swift Enumeration Evaluation”