📦ShadowStyle

(struct)

SwiftUIviewdrawingshadowShadowStyle

ShadowStyle 陰影樣式 (目前只出現在 ShapeStyle兩個 shadow() 的參數中)。

// Color 遵循 ShapeStyle, 因此 .blue 可呼叫 .shadow() (instance method)
// shape.fill(shapeStyle_withShadow)
Circle()
    // 藍色+陰影       ╭─⭐️ShadowStyle─╮
    .fill(.blue.shadow(.drop(radius: 10)))

Last updated

Was this helpful?