I am going through https://www.raywenderlich.com/4001741-swiftui/lessons/4 and was stuck on Text.background where in video the backcolor was changed to Color.gray.
Just out of curiosity I tried to check the documentation of Text.background method but could not spot it in documentation. Then I found it in View.background.
But in View.background there was no parameter which takes Color as input. On further digging I found that input is Background which is of type View and Color has been extended to implement View.
All in all I was able to put all piece together but that was because instructor had written Text.background(Color.gray) but otherwise since I am a starter so it is not very easy to deduce that Text.background could even take Color as parameter.
Is there any suggestion for newbies to handle such situation because otherwise I can’t imagine I would have passed Color to background had I followed the documentation only.