我工作依靠的是高度依赖窗口集团的愿景服务。 如果你使用窗户,你就可以消除我有时想要的玻璃背景。 我有时喜欢玻璃。 财产窗户显然是一种规程,在试图设定时,我可以不使用独家经营人,因为它要求大体类型相同。 我怎么办?
我在下面对法典做了如下规定:如果我单独使用,就会进行罚款,但如果我试图将罚款与毛皮联系起来,则会发生错误。 我将每一次尝试之后的错误信息包括在内。
WindowGroup {
//Display the tutorial view.
SetupView()
}
//This Works
.windowStyle(.plain)
//This also works
.windowStyle(.automatic)
//But they can t combine. What I have tried.
.windowStyle(showGlassBackground ? .plain : .automatic) //Member automatic in PlainWindowStyle produces result of type DefaultWindowStyle , but context expects PlainWindowStyle
.windowStyle(showGlassBackground ? (.plain as WindowStyle) : (.automatic as WindowStyle) //Type any WindowStyle cannot conform to WindowStyle
.windowStyle(showGlassBackground ? (PlainWindowStyle.plain as any WindowStyle) : (DefaultWindowStyle.automatic as any WindowStyle)) //Value of type any WindowStyle has no member windowStyle
.windowStyle(showGlassBackground ? (PlainWindowStyle.plain as WindowStyle) : (DefaultWindowStyle.automatic as WindowStyle)) //Type any WindowStyle cannot conform to WindowStyle
.windowStyle(showGlassBackground ? WindowStyle(.plain) : WindowStyle(.automatic)) // any WindowStyle cannot be constructed because it has no accessible initializers