Design Notes Diary #9

Design Notes Diary

Yesterday I went to my first Christmas Party of the season. So of course I felt compelled to build a festive watch face for my Ultra for the occasion.

This paired with a stainless steel watch band gave quite a nice effect, if I do say so myself.

Q&A

A couple of my Live Activities questions got answered last night in the Apple Q&A. Most importantly I got some clarification about the intention and flow of the new staleDate option added in iOS 16.2. This allows us to mark deadlines where our live activities are no longer valid. While theoretically my Live Activity should never be out of date because the updates are coming from the locally running app (rather than via Push), it is useful for me to adopt them so that if for some reason the app’s updates cease to flow the user doesn’t get presented with stale data. For example, if they were using the map to help navigate I wouldn’t want them to see old positions and think they were still accurate.

Pain, lots of Pain

One of my least favorite parts of iOS development is fighting with frameworks. In this case I just spent the better part of half a day trying to get ScrollViews to interact nicely with my custom TabBar. In UIKit I’d accomplish this with scrollIndicatorInsets and contentInset, but sadly neither of these exist in SwiftUI as far as I can tell. So instead I’m left to baling wire and duct tape to get something workable here. 😔

It is entirely possible that I’ve just missed some API that accomplishes what I want (a scrollView that visually extends edge to edge of the screen but which doesn’t scroll all the way to the bottom), but I haven’t found it yet.

As is so often the case in development it is a question of trade offs. I want

  • Custom, Dynamic type supporting tab bar
  • Frosted background effect on tab bar where scrolling content goes under the bar
  • To use SwiftUI

I can easily get any two of those three, but wanting all three is very challenging.

Real Talk

The rest of my day was a bit of a mess. I didn’t feel creative, competent or clever. I mostly just floundered around for a few hours trying to fix bits and pieces but didn’t accomplish much. Largely, just feeling sorry for myself.

It is kinda funny to have this diary project going on days like this. Days like that are not uncommon. Where I just feeling unproductive and that the work I’m doing isn’t going anywhere. Thankfully those days are offset by the complete opposite experience, where coding feels like running down a hill on a sunny day. But in the moment, it is still rather unfortunate.

If I try to take a step back and be thoughtful about why I might feel like that today I think it is because I didn’t wisely match my choice of task to my physical state. I didn’t sleep well last night and think that put me at a disadvantage when I started working. Then by tackling one of the most challenging and frustrating things in programming (fighting the frameworks), I was setting myself up for disaster. From there it was just a progressive digging myself into a deeper hole productivity-wise. The smart thing likely would have been to recognize where I was cognitively/emotionally and then go after easier, quick win tasks today instead.

Oh well. Tomorrow is another day.

David Smith