Day 47 Complete

2022-08-27 2 min read

OMFG I have finally complete day 47 of the 100 Days of SwiftUI challenge today. It’s easy to think that it has taken me 13 whole days, or 18,720 minutes to complete the task of developing the habit app for the final challenge in day 47, but no that’s not correct at all.

Truly it’s been a stressful time for me and the family over the last two weeks, and what I’ve found is that the more stress that exists in my body and in my mind, the less I’m able to take time out and think clearly and carefully through the development of a SwiftUI app. The family are collectively working through the various issues and I’m sure we’ll be fine in the end, but know that this was the holdup.

I sat down Wednesday this week and finally got a chance to start work on the Habit tracking app, I completed the work today on Saturday morning. In some respects it’s a fairly straight forward app that has the same characteristics and patterns of many example and challenge apps from the 100 Days of SwiftUI, but there was one subtle thing that had me stumped, which I put down to my tired and inexperienced brain reverting to non SwiftUI patterns. I unded up staring at [this] youtube video to figure out where I was going wrong. The bit around 10mins really helped solve my blockage.

The bit that had me blocked was how to complete the ViewHabit view, where you’re really just looking at a single habit, but also mutating it and mutating the Habits array also. My initial attempt at this had XCode throwing up “Cannot use mutating member on immutable value: ‘self’ is immutable in SwiftUI” errors. Nonetheless, I’ve not resolved the issue and now move onto Day 48.

You’ll find my version of the app here.