100 Days of SwiftUI
2026-07-18
Project 13, part 4
Starting work on the actual app
Building our basic UI
- basic layout
- practice moving “work” out of the view and into methods/funcs
Importing an image into SwiftUI using PhotosPicker
PhotosPickeris built in, but does need some effort to make it work- Swift Images are Images, but filters etc want DATA
Basic image filtering using Core Image
- Not everything can be done directly in SwiftUI, so knowing how to use “older” frameworks is helpful
- CGImage, CIImage, UIImage, SwiftUI Image — all are needed to display a modified/modifiable image in iOS
Core Image filters have a dedicated
inputImageproperty that lets us send in aCIImagefor the filter to work with, but often this is thoroughly broken and will cause your app to crash — it’s much safer to use the filter’ssetValue()method with the keykCIInputImageKey.