I'm trying to create a plain view with a background color in SwiftUI. But everything I can find are elements that are not plain views like Text, Button, Image, List, etc..
When I try to use View
, it shows me following error messages:
- 'View' cannot be constructed because it has no accessible initializers
- 'View' Protocol can only be used as a generic constraint because it has Self or associatedType requirements
How do I create a rectangular view with background color?