I’m doing Module 4 Lesson 8 challenge and as errors come up I try to solve them on my own or google it but become defeated and check Chris’s answer and a simple flip in the order of things works. Is there some way to know if certain things have to come first?
Such as in this lesson’s challenge I put the .fill modifier after the .frame modifier and it kept tell me ‘someView’ has no member ‘fill’. So I’m checking Chris’s answer and he put the .fill keyword first. I try switching my code to have .fill first and it worked. Then I try copying the code from Chris’s answer to test with and come to the same conclusion.
Additionally when writing this challenge I put the LazyVStack inside the ForEach loop and it isn’t working. When I check Chris’s answer he has the ForEach inside the LazyVStack. I get that this is a container element and but to a beginner such as myself I don’t understand why the other way around wouldn’t work. P.S. I realize obvious keywords have to come before others where it affects the design.
Needless to say is their general rules to figure out the less obvious order of code?
order switched
Chris’s .fill code
order switched