I am using Xcode 12.5.
Reference: I am trying to do the IOS Foundations Swift UI: Mod 4: Lesson 8 challenge. The challenge is to create scrollable view of identical rectangles with rounded corners. The rectangles must have a gradient fill.
Problem: When I recreate the code Chris has in the solution, Xcode does not accept the .fill modifier. I was able to get a gradient background using .background, but Xcode would not accept .foreground.
Question 1: Why does Xcode accept .fill for Chris and not for me when we have exactly the same code?
Question 2: How can I get the gradient effect to fill the rectangle if I can’t use .fill? is there another modifier that might work?