TIL

iOS UI, UIKit, Auto Layout, etc.

UIKit Catalog: Creating and Customizing Views and Controls

This sample guides you through several types of customizations you can make in your iOS app. It is built with Mac Catalyst, which means the sample runs on both iOS and macOS.

Variable Width Strings

Wouldn’t it be useful if you could automatically change the text based on the available space? There’s a little-known feature of the localization system that does precisely that.

UIView styling with functions

Today I want to talk about UIView styling. The common approach when we want to customize the display of native UI controls (for instance UIButton or UILabel) is to create a subclass that overrides a bunch of properties. That works well most of the time, but some problems may arise.

Popovers, UINavigationController, and preferredContentSize

In this post we’ll look at a very specific but tricky interaction in UIKit, one which took me multiple days to work out how to implement.

Modality changes in iOS 13

One behavior that changed and might break your old app once you starting adopting new iOS 13 is the modal presentation.

The iOS 13 Design Guidelines: An Illustrated Guide

In this article, we’re going to cover basically everything you need to know to design an iPhone app following standard iOS 13 conventions and style.

Tweaking The iOS System Fonts

Before you switch to a custom font don’t overlook how much you can tweak the appearance of the system fonts. A quick review of some font APIs that work for both UIKit and SwiftUI.

Discoverable Key Commands

One standard behavior of iPadOS is that when an app supports keyboard shortcuts, simply holding down the command key presents a nice heads-up display (HUD) with the list of shortcuts. For example, if you press the command key on the iPad home screen, you’ll see something like this…

Stack View Changes In iOS 15

Apple didn’t add any new features to stack views in iOS 15 but they have made a subtle change to the implementation that might catch you out when deploying back to earlier iOS versions.

Button Configuration in iOS 15

Apple gave buttons a big upgrade in iOS 15. You now create and update button configurations much like the changes Apple introduced for collection and table view cells in iOS 14.

Using QLPreviewController

I was today year’s old when I realized you can use the QuickLook framework to perform this custom view controller transition for you with one delegate method 🤯.

See: QLPreviewController

Registering For Trait Changes

Apple deprecated traitCollectionDidChange in iOS 17, replacing it with a method to register for specific trait changes. Let’s see how that works.

The Comprehensive Guide to iOS Context Menus

Faster UIActivityViewController Share Sheets with UIActivityItemProvider - Dan Griffin

Overriding Dark Mode

More Efficient/Faster Average Color of Image

SF Symbols

SF Symbols Changes in iOS 14.2

There are now three different sets of symbols to consider…

SF Symbol Changes in iOS 15

Apple announced SF Symbols 3. There are approximately 600 new symbols, multicolor symbols now work correctly in UIKit, and there are two new rendering modes with enhanced color customisation: hierarchical and palette.