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”

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”

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”

Nicely Formatted Lists with ListFormatter

Last time we took a look at the very useful RelativeDateTimeFormatter to create localized strings describing date differences programmatically. In this post we’ll look at a better way to handle presenting lists to your users. As programmers, it’s pretty common to have to take a list of objects (e.g. apples, bananas, oranges) and express theContinue reading “Nicely Formatted Lists with ListFormatter”

Using UITabBarAppearance for Tab Bar changes in iOS 13

With iOS 13, Apple finally made some long overdue changes to support more effective customizations of the tab bars, and tool bars in your apps. The new UITabBarAppearance, UIBarAppearance, and related classes lets developers easily modify not just the basics like background and selected colors but spacing, text attributes, badging, and positioning. Creating subtle effectsContinue reading “Using UITabBarAppearance for Tab Bar changes in iOS 13”