0

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?

struct SwiftUIView2: View {
    @State var color = Color(#colorLiteral(red: 0.20000000298023224, green: 0.49803921580314636, blue: 0.6901960968971252, alpha: 1))
    var body: some View {
        Text("Hello, World!")
            .background(Color(#colorLiteral(red: 0.20000000298023224, green: 0.49803921580314636, blue: 0.6901960968971252, alpha: 1)))
    }
}

enter image description here

ursan526
  • 485
  • 3
  • 10

0 Answers0