iOS


The Developer’s Guide to List Content Views in iOS 14

In an earlier article, I introduced iOS 14’s new content configuration architecture. You have a UIContentConfiguration object and a UIContentView, and they go together. Configuring the content configuration object expresses the data you want represented; the configuration object then generates the content view, which constructs the interface that displays that data. As I showed in …

The Developer’s Guide to List Content Views in iOS 14 Read More »


The Developer’s Guide to Cell Content Configuration in iOS 14

Have you ever written table view code like this? override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: cellID, for: indexPath) let label = // … label.text = “Hello, world” return cell } Looks simple and innocent enough, but there’s something very wrong with it, philosophically speaking. This is …

The Developer’s Guide to Cell Content Configuration in iOS 14 Read More »


The iOS Developer’s Guide to Updating an App to iOS14

Each year, like clockwork, for better or worse — sometimes, in my opinion, very much for worse — Apple releases a new version of iOS. We’re all used to the forced march of the calendar by now. In June, WWDC is held, and the new version appears in beta. In September, it goes final. And …

The iOS Developer’s Guide to Updating an App to iOS14 Read More »


Control, Target, and Action in iOS 14

The target–action pattern is one of the oldest in Cocoa, and it’s used with some of the most important interface objects, namely controls (UIControl). That includes buttons (UIButton), switches (UISwitch), segmented controls (UISegmentedControl), and many others. It is also used with UIBarButtonItem because it’s button-like even though it isn’t a control (or even a view). …

Control, Target, and Action in iOS 14 Read More »


Xcode Tip of the Day: Work in Two Places

In Xcode, the object of your attention is very often two or more files simultaneously. In Objective-C, you might want to work in a class’s header file and its implementation file. In a storyboard-based app, you might want to work in a storyboard scene and in the UIViewController subclass that it corresponds to. You might …

Xcode Tip of the Day: Work in Two Places Read More »


Improvements in Testing in Xcode 12

Xcode 12, iOS 14, and Swift 5.3 bring with them a number of significant improvements in testing. If you live and die by tests — or even if you just wish you did — you’re going to be very happy to hear about these. Some of these changes actually appeared earlier, in Swift 5.2, Xcode …

Improvements in Testing in Xcode 12 Read More »


Xcode 12 — What a Pane

As iOS programmers, we live and breathe and have our being within Xcode, so it makes sense to be as familiar as possible with its capabilities, and to take advantage of whatever innovations allow us to get work done. But, ironically, as a new version of Xcode is released, exactly when noteworthy new features are …

Xcode 12 — What a Pane Read More »


Swift 5.2: Object References as Functions in Swift

Here’s a Swift language feature that you may not have noticed when it arrived in Swift 5.2. The following syntax can now be made legal: let p = Person(firstName: “Matt”, lastName: “Neuburg”) let s = p() print(s) // Matt Wait, what just happened? I treated an instance as a function, and it worked (in the …

Swift 5.2: Object References as Functions in Swift Read More »