Codakuma
iOS apps and more

Posts

iOS 14's bizarre text casing behaviour in List headings

Here’s a SwiftUI list with a section header:

Read more »
Multiline text in SwiftUI

I keep running into an issue in SwiftUI where some text truncates where I don’t expect it to. Here’s an example from Personal Best’s onboarding screen:

Read more »
Building a more generic page control in SwiftUI

One of the components missing from SwiftUI (as of iOS 13.5) is Page Control.

Read more »
SwiftUI view modifers and dark mode

In SwiftUI, you can achieve most UI needs without ever explicitly checking for dark mode, thanks to semantic colours built into the platform and the ability to define our own semantic colours that automatically adapt to dark mode.

Read more »
Personal Best 3

I know, I know. Two major version bumps in seven days. It wasn’t intentional.

Read more »
Earliest sample dates in HealthKit

When building a watchOS extension for my iPhone app Personal Best, I couldn’t figure out why querying the HealthKit store for workouts was only returning 25 results, as opposed to over 700 on iPhone.

Read more »
Running HealthKit queries in the background

Recently I’ve been trying to use HKObserver to monitor queries from HealthKit in the background. I wrote a simple integration where my app would print to the console every time a new workout was recorded. However, it was never triggered, except when I opened my app in the foreground.

Read more »
Personal Best 2

Personal Best started as a small project to learn SwiftUI and ship an app. I never really intended to ship a 2.0, I figured it would just be a fun proof of concept I could share with my friends.

Read more »
Making SwiftUI navigation bar buttons bigger

Apple’s human interface guidelines specify that tap targets should be at least 44x44pt to ensure they’re easily tappable.

Read more »
SwiftUI sheets and environment objects

@EnvironmentObject is handy for passing data between views in SwiftUI. Hacking With Swift has an excellent guide on how to use it, but when I followed it, one some of my views it just wasn’t working correctly.

Read more »