Your Second iOS & SwiftUI App, Episode 23: Environment | raywenderlich.com

An environment is a storage container for potentially any information that multiple views need to function.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/25836622-your-second-ios-swiftui-app/lessons/23

The versiรณn of the App that you use in this episode is not the same. Yo use UIImage in the Library instead of Image, like the rest of the course.

4 Likes

For anybody stuck with the UIImage thing, just use Image. Seems like this video may need some update

1 Like

This was the most frustrating thing! Thanks.

I just ran into the same problem. I believe it should read:

images[book] = image

Woooaaahh. What just happened in this episode (and section) of the course? The code is different and the amount of new concepts just absolutely exploded with very little explanation of how it works. This was a really frustrating watch and feels like someone put a road block in my learning path.

I think it would really help if there was a note about the images array change in Library somewhere on the lessons page like you have for the newer versions of Xcode and any breaking changes. I often get through tutorials by making sure my code matches exactly, and when the code changes suddenly itโ€™s like having the rug pulled from beneath you.