100 Days of SwiftUI
2026-07-20
Project 13, part 6
you’re going to need to know about Apple’s older frameworks for the foreseeable future because they aren’t going away.
Quiz: 10/12
Challenges
- Try making the Slider and Change Filter buttons disabled if there is no image selected.
Because the “change filter” button and the “intensity” slider are in different HStacks I set the same modifiers to each HStack
.disabled(selectedItem == nil)
.opacity(selectedItem == nil ? 0 : 1)What this does is disable and completely dim the controls. I tried just using .disabled() but the button, text, and slider all responded differently and it was messy.
- Experiment with having more than one slider, to control each of the input keys you care about. For example, you might have one for radius and one for intensity.
The most straightforward way to do this (IMO) is to add more sliders with their own bindings. It’s not wonderful though, because individual filters don’t respond to all of the settings, and you’re not sure which one is gonna work.
One option is to keep only one slider, but change its label depending on which filter is chosen. That’s not much different from the original.
- Explore the range of available Core Image filters, and add any three of your choosing to the app.
There are A LOT of filters available.

In order to make this a little easier, I changed the list of filters to an enum — I did have to have some help because things got wonky there for a minute. But now I can add filters with abandon! 🙃
case .none: return "No filter"
case .bloom: return "Bloom"
case .circleSplash: return "Circle Splash"
case .crystallize: return "Crystallize"
case .gaussian: return "Gaussian Blur"
case .grayscale: return "Grayscale"
case .hue: return "Hue Adjust"
case .lineOverlay: return "Line Overlay"
case .pixellate: return "Pixellate"
case .sepia: return "Sepia Tone"
case .unsharp: return "Unsharp Mask"
case .vignette: return "Vignette"edges() doesn’t really work with the supplied images, and neither does edgeWork(). lineOverlay() is pretty ok though.
OK. So now if the filter wants Intensity, Radius, Scale, Angle, or Saturation, those sliders are available, not just one at a time.
The only thing that really needs work is combining adjustments and I’m going to wait on that for a bit.