Previews of colors disappeared after xcode 13.1 update. Preview works when set as variable. but the previews directly in the code are no longer visible. What can I do to see color previews?
Version 13.1 (13A1030d)
Previews of colors disappeared after xcode 13.1 update. Preview works when set as variable. but the previews directly in the code are no longer visible. What can I do to see color previews?
Version 13.1 (13A1030d)
i saw this on the stackoverflow comments of a related issue, i tried it and it worked for me... you have to actually type out #colorLiteral() and it will turn it into the color picker that you're expecting...
var color = #colorLiteral() //at this point it will turn this #colorLiteral into a broken image icon, but that's your color picker... and it'll look right after you select a color.
Rectangle().fill(Color(color)) // then just pass in the color you instantiated above
At the end it should look something like this: