100 Days of SwiftUI
2026-05-24
Consolidation III
Milestone: Projects 4-6
You can understand how SwiftUI works, but still be drawing a blank about what it takes to make something happen. This is a particular problem for folks who have prior programming experience, because they are used to the other way of thinking – they have months, years, or perhaps even decades of muscle memory that makes it very easy to solve problems, but only if they get to dictate exactly how everything should behave.
Remember, in SwiftUI all our views – and all our animations – must be a function of our state. That means we don’t tell the button to spin, but instead attach the button’s spin amount to some state, then modify that state as appropriate. Often this becomes frustrating, because we know where we want to get to but don’t know how to get there.
This is where I am. It is a struggle for me to coax the program to do what I want.
When we write
0..<5we get aRange<Int>, but when we write0...5we get aClosedRange<Int>. Even though it looks similar to us, Swift considers these two range types to be different and so we can’t use a closed range with ForEach – it just isn’t possible right now
Huh, I noticed this happening and now I know why!
Challenge
Your goal is to build an “edutainment” app for kids to help them practice multiplication tables – “what is 7 x 8?” and so on. Edutainment apps are educational at their core, but ideally have enough playfulness about them to make kids want to play.
Breaking it down:
- The player needs to select which multiplication tables they want to practice. This could be pressing buttons, or it could be an “Up to…” stepper, going from 2 to 12.
- The player should be able to select how many questions they want to be asked: 5, 10, or 20.
- You should randomly generate as many questions as they asked for, within the difficulty range they asked for.
Noting that Hudson says over and over to “get something working first” then make it fun if you have time.
I will admit to having the donwannas about this. I’ve learned a lot already! but I also feel like I still make the same mistakes all the time.
a long time passes….
It’s not pretty at all, but I at least got some score-chicks 😀
