我有这个简单的观点:
struct SplashscreenView: View {
var body: some View {
ZStack {
Color("primary").edgesIgnoringSafeArea(.all)
Text("Hello, World!")
}
}
}
primary
中定义了颜色[:
Assets.xcassets
但是在我看来,颜色不会显示:
如果我强制使用系统的颜色,例如Color.red,则会正确显示颜色。