My original question was going to be about View in background(View). In the development environment I selected some text, then in the inspector I added a new Modifier, background, and selected a color from the drop down. My code became background(View). Didn’t make much sense. I think there is a structure in swift called View. In my code I reference it. The View in the modifier was highlighted and the other ones were not. I deleted the line and typed .background(View) and Swift complained that View didn’t match. I bit the bullet and started this post, did a copy and paste, and other text appeared as if my magic.
So, what’s the story? Why does the development environment hide stuff? Why is the hidden stuff much more complex than color.red? How do I see what is there, other than copy paste to some other text editor? How do I change it, in the IDE text editor?
One principal I try to work with in UIs is to not surprise the user. I spend quite a bit of time puzzling over the use of View when I could clearly see that View was a structure that I did not think belonged here. Where was the color I selected? I changed the color in the inspector and the source did not change. I quit the IDE and restarted it and the color stayed, so I was being saved someplace. A right click on View did not help. I was completely suprised to find out how it worked, at least in part cause I still have questions.