I'm Getting Error in Swift UI Code That 1)Protocol type 'Any' cannot conform to 'View' because only concrete types can conform to protocols 2)Value of type 'Text' has no member 'color'
Can anyone find the Solution?
There is No such a modifier as color()
. Use foregroundColor()
:
Text("Hello world")
.foregroundColor(.red)