iOS 14's bizarre text casing behaviour in List headings

Here’s a SwiftUI list with a section header:

List {
  Section(header: Text("Hello world")) {
    ...
  }
}

In iOS 13, this appeared like you’d expect:

iOS 13 list section header example

Rebuild this with the iOS 14 SDK, and everything is forced to uppercase:

iOS 14 list section header example

This is… kind of annoying. I think it’s intentional, as it’s still present up to beta 4. If only it were documented somewhere so we’d know for sure if it’s intentional or a bug to be fixed later.

Anyway, the workaround is easy:

List {
  Section(header: Text("Hello world").textCase(nil)) {
    ...
  }
}

BRB, I’m off to add .textCase(nil) to about 100 different places in my codebase.

Thanks for reading.

To get in touch, email me or find me on Mastodon or Twitter.

If you liked this post, you'll love my iOS apps. Check them out below.

Personal Best

Level up your workouts

Taylor's Version

Upgrade Taylor Swift songs in your playlists

SalaryPig

Meet Trevor, the salary-tracking pig

Taylor Swift Quiz

How well do you know Taylor Swift?