Kevin ABRIOUX
Kevin ABRIOUX

Reputation: 17705

Color not loaded from assets with SwiftUI

I have this simple view :

struct SplashscreenView: View {
    var body: some View {
        ZStack {
            Color("primary").edgesIgnoringSafeArea(.all)
            Text("Hello, World!")
        }

    }
}

The color primary is defined in Assets.xcassets :

enter image description here

But in my view, color is not displayed :

enter image description here

If i force with system's color, like Color.red, the color is correctly displayed.

Upvotes: 2

Views: 1275

Answers (0)

Related Questions